Package org.cip4.jdflib.datatypes
Class JDFDurationRangeList
java.lang.Object
org.cip4.jdflib.datatypes.JDFRangeList
org.cip4.jdflib.datatypes.JDFDurationRangeList
- All Implemented Interfaces:
JDFBaseDataTypes
-
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
rangeListFields 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
ConstructorsConstructorDescriptionempty constructorconstructs a JDFDurationRangeList from a given stringconstructs a JDFDurationRangeList from the given JDFDurationRangeList -
Method Summary
Modifier and TypeMethodDescriptionvoidadd a duration range r =rMin~rMaxvoidadd an individual JDFDuration elementvoidappend(JDFDuration xMin, JDFDuration xMax) add a duration range defined by two dates xMin~xMaxstatic JDFDurationRangeListfactory for JDFDurationRangeList that silently returns null in case of illegal stringsprotected ArrayList<JDFDuration>booleaninRange - returns true if the given JDFDuration value is in one of the ranges of the range listbooleanisOrdered - tests if 'this' is OrderedRangeListbooleanisUniqueOrdered - tests if 'this' is UniqueOrdered RangeListbooleanisValid - validate the given StringvoidsetString - parse the given string and set the duration range list
-
Constructor Details
-
JDFDurationRangeList
public JDFDurationRangeList()empty constructor -
JDFDurationRangeList
constructs a JDFDurationRangeList from a given string- Parameters:
s- the given string- Throws:
DataFormatException- - if the String has not a valid format
-
JDFDurationRangeList
constructs a JDFDurationRangeList from the given JDFDurationRangeList- Parameters:
rl- the given JDFDurationRangeList
-
-
Method Details
-
createDurationRangeList
factory for JDFDurationRangeList that silently returns null in case of illegal strings- Parameters:
s- the string to parse- Returns:
- the JDFDurationRangeList, null if s is not compatible
-
inRange
inRange - returns true if the given JDFDuration value is in one of the ranges of the range list- Parameters:
x- the given JDFDuration (duration) value to compare- Returns:
- boolean - true if in range otherwise false
-
setString
setString - parse the given string and set the duration range list- Parameters:
s- the given string- Throws:
DataFormatException- - if the String has not a valid format
-
isValid
isValid - validate the given String- Parameters:
s- the given string- Returns:
- boolean - false if the String has not a valid format
-
append
add a duration range r =rMin~rMax- Parameters:
r- the Duration range to append to the list
-
append
add a duration range defined by two dates xMin~xMax- Parameters:
xMin- the left value of the Duration range to append to the listxMax- the right value of the Duration range to append to the list
-
append
add an individual JDFDuration element- Parameters:
x- the left and right value of the Duration range to append to the list
-
isOrdered
public boolean isOrdered()isOrdered - tests if 'this' is OrderedRangeList- Specified by:
isOrderedin classJDFRangeList- Returns:
- boolean - true if 'this' is a OrdneredRangeList
-
getOrderedArray
-
isUniqueOrdered
public boolean isUniqueOrdered()isUniqueOrdered - tests if 'this' is UniqueOrdered RangeList- Specified by:
isUniqueOrderedin classJDFRangeList- Returns:
- boolean - true if 'this' is UniqueOrdered RangeList
-