|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.cip4.jdflib.datatypes.JDFRangeList
org.cip4.jdflib.datatypes.JDFXYPairRangeList
public class JDFXYPairRangeList
This class is a representation of a xy pair range list (JDFXYPairRangeList). It is a whitespace separated list of xy pair ranges, for example "1 2~5 8 10.25 10.25~44.55 55.34"
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface org.cip4.jdflib.datatypes.JDFBaseDataTypes |
|---|
JDFBaseDataTypes.EnumFitsValue |
| Field Summary |
|---|
| Fields inherited from class org.cip4.jdflib.datatypes.JDFRangeList |
|---|
rangeList |
| Fields inherited from interface org.cip4.jdflib.datatypes.JDFBaseDataTypes |
|---|
EPSILON, MAX_CMYK_COLOR, MAX_LAB_COLOR, MAX_MATRIX_DIMENSION, MAX_RECTANGLE_DIMENSION, MAX_RGB_COLOR, MAX_SHAPE_DIMENSION, MAX_XY_DIMENSION |
| Constructor Summary | |
|---|---|
JDFXYPairRangeList()
constructs an empty range list |
|
JDFXYPairRangeList(JDFXYPairRange r)
constructs a JDFXYPairRangeList with the given JDFXYPairRange |
|
JDFXYPairRangeList(JDFXYPairRangeList rl)
copy constructor constructs a JDFXYPairRangeList with the given JDFXYPairRangeList |
|
JDFXYPairRangeList(String s)
constructs a JDFXYPairRangeList with values from a given string |
|
| Method Summary | |
|---|---|
void |
append(JDFXYPair x)
append - appends a new range to the range list, based on a single JDFXYPair |
void |
append(JDFXYPair xMin,
JDFXYPair xMax)
append - appends a new range to the range list |
void |
append(JDFXYPairRange r)
append - appends a JDFXYPairRange to this number range |
static JDFXYPairRangeList |
createXYPairRangeList(String s)
factory for JDFXYPairRangeList that silently returns null in case of illegal strings |
boolean |
inRange(JDFXYPair x)
inRange - returns true if the given JDFXYPair value is in one of the ranges of this range list |
boolean |
isOrdered()
isOrdered - tests if 'this' is OrderedRangeList |
boolean |
isUniqueOrdered()
isUniqueOrdered - tests if 'this' is UniqueOrdered RangeList |
boolean |
isValid(String s)
isValid - validate the given String |
void |
setString(String s)
setString Parse the string and set the single ranges or pairs and put them into a vector. |
| Methods inherited from class org.cip4.jdflib.datatypes.JDFRangeList |
|---|
at, begin, clear, elementAt, end, equals, erase, getString, getString, hashCode, isList, isPartOfRange, isPartOfRange, isUnique, remove, size, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public JDFXYPairRangeList()
public JDFXYPairRangeList(JDFXYPairRangeList rl)
rl - the JDFXYPairRangeList to copypublic JDFXYPairRangeList(JDFXYPairRange r)
r - the given JDFXYPairRange
public JDFXYPairRangeList(String s)
throws DataFormatException
s - the given string
DataFormatException - - if the String has not a valid format| Method Detail |
|---|
public static JDFXYPairRangeList createXYPairRangeList(String s)
s - the string to parse
public boolean inRange(JDFXYPair x)
x - the given double value to compare
public void setString(String s)
throws DataFormatException
For example, if the string looks like this: * "1 2 ~ 4 5 6 7 ~ 8 9 10 11 ~ 1 1"
it is the representation of 3 ranges:
range 1: "1 2 ~ 4 5", range 2: "6 7 ~ 8 9" and range 3: "10 11 ~ 1 1"
s - the given string to cut in seperate xy pair ranges
DataFormatExceptionpublic boolean isValid(String s)
s - the given string
public void append(JDFXYPairRange r)
r - the JDFXYPairRange range to append
public void append(JDFXYPair xMin,
JDFXYPair xMax)
xMin - the min value of the new rangexMax - the max value of the new rangepublic void append(JDFXYPair x)
x - both the min and the max value of the new rangepublic boolean isOrdered()
isOrdered in class JDFRangeListpublic boolean isUniqueOrdered()
isUniqueOrdered in class JDFRangeList
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||