|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.opengts.util.XYPair
public class XYPair
Container for an X/Y pair.
Used by CurveFit as a point container.
Field Summary | |
---|---|
protected boolean |
isValid
|
protected double |
X
|
protected double |
Y
|
Constructor Summary | |
---|---|
XYPair(double x,
double y)
X/Y Constructor |
|
XYPair(java.lang.String xyStr)
String Constructor |
|
XYPair(XYPair xyPair)
Copy Constructor |
Method Summary | |
---|---|
static XYPair |
Copy(XYPair xy)
Returns a deep copy of the specified XYPair instance |
static XYPair[] |
CreateList(double[][] xyList)
Returns a deep copy of the specified XYPair list |
static XYPair[] |
CreateList(XYPair[] xyPair)
Returns a deep copy of the specified XYPair list |
static double |
GetMaximumX(XYPair[] xyPair)
Minimum value for X in the specified list |
static double |
GetMinimumX(XYPair[] xyPair)
Minimum value for X in the specified list |
static double |
GetRangeX(XYPair[] xyPair)
Range of X in the specified list |
double |
getX()
Gets the value for X |
double |
getY()
Gets the value for Y |
static int |
IndexOfListEndChar(java.lang.String xyListStr,
int fromNdx)
Gets the index of the end-of-list character |
static int |
IndexOfListStartChar(java.lang.String xyListStr,
int fromNdx)
Gets the index of the start-of-list character |
static boolean |
IsSortedByX(XYPair[] xyPair,
boolean dupOK)
Returns true if the list is sorted by X in ascending order, with no duplicates |
boolean |
isValid()
Returns true if valid. |
static void |
main(java.lang.String[] argv)
|
static XYPair[] |
ParseXYPair(java.lang.String xyListStr)
Parse XY pair list. |
static XYPair[] |
ParseXYPair(java.lang.String xyListStr,
int fromNdx)
Parse XY pair list. |
static XYPair[] |
SortByX(XYPair[] xyPair)
Sorts the XYPair list by the X value |
static boolean |
startsWithListChar(java.lang.String xyListStr)
Returns true if the specified list starts with a XYPair list character |
static java.lang.String |
ToListString(XYPair[] xyList)
Returns a properly formatted XYPair list String |
static java.lang.StringBuffer |
ToListString(XYPair[] xyList,
java.lang.StringBuffer sb)
Appends a properly formatted XYPair list to the specified StringBuffer |
java.lang.String |
toString()
Returns a String representation of this instance |
java.lang.StringBuffer |
toString(java.lang.StringBuffer sb)
Appends a String representation of this instance to the specified StringBuffer |
double |
X()
Gets the value for X |
double |
Y()
Gets the value for Y |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected double X
protected double Y
protected boolean isValid
Constructor Detail |
---|
public XYPair(XYPair xyPair)
public XYPair(double x, double y)
public XYPair(java.lang.String xyStr)
Method Detail |
---|
public static int IndexOfListStartChar(java.lang.String xyListStr, int fromNdx)
public static int IndexOfListEndChar(java.lang.String xyListStr, int fromNdx)
public static boolean startsWithListChar(java.lang.String xyListStr)
public static XYPair[] ParseXYPair(java.lang.String xyListStr)
public static XYPair[] ParseXYPair(java.lang.String xyListStr, int fromNdx)
public static XYPair Copy(XYPair xy)
public static XYPair[] CreateList(XYPair[] xyPair)
public static XYPair[] CreateList(double[][] xyList)
public static boolean IsSortedByX(XYPair[] xyPair, boolean dupOK)
xyPair
- An array of XYPair'sdupOK
- True to allow duplicate X entriespublic static XYPair[] SortByX(XYPair[] xyPair)
public static double GetMinimumX(XYPair[] xyPair)
public static double GetMaximumX(XYPair[] xyPair)
public static double GetRangeX(XYPair[] xyPair)
public boolean isValid()
public double getX()
public double X()
public double getY()
public double Y()
public java.lang.StringBuffer toString(java.lang.StringBuffer sb)
public java.lang.String toString()
toString
in class java.lang.Object
public static java.lang.StringBuffer ToListString(XYPair[] xyList, java.lang.StringBuffer sb)
public static java.lang.String ToListString(XYPair[] xyList)
public static void main(java.lang.String[] argv)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |