public class JDFXYPairRangeList extends JDFRangeList
JDFBaseDataTypes.EnumFitsValue
rangeList
EPSILON, MAX_CMYK_COLOR, MAX_LAB_COLOR, MAX_MATRIX_DIMENSION, MAX_RECTANGLE_DIMENSION, MAX_RGB_COLOR, MAX_SHAPE_DIMENSION, MAX_XY_DIMENSION
Constructor and Description |
---|
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
|
Modifier and Type | Method and Description |
---|---|
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. |
public JDFXYPairRangeList()
public JDFXYPairRangeList(JDFXYPairRangeList rl)
rl
- the JDFXYPairRangeList to copypublic JDFXYPairRangeList(JDFXYPairRange r)
r
- the given JDFXYPairRangepublic JDFXYPairRangeList(String s) throws DataFormatException
s
- the given stringDataFormatException
- - if the String has not a valid formatpublic static JDFXYPairRangeList createXYPairRangeList(String s)
s
- the string to parsepublic boolean inRange(JDFXYPair x)
x
- the given double value to comparepublic 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 rangesDataFormatException
public boolean isValid(String s)
s
- the given stringpublic void append(JDFXYPairRange r)
r
- the JDFXYPairRange range to appendpublic 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 JDFRangeList
public boolean isUniqueOrdered()
isUniqueOrdered
in class JDFRangeList
Copyright © 2018. All rights reserved.