Package org.cip4.jdflib.datatypes
Class JDFDurationRange
java.lang.Object
org.cip4.jdflib.datatypes.JDFRange
org.cip4.jdflib.datatypes.JDFDurationRange
- 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 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 range constructorConstruct a JDFDurationRange from a stringcopy constructorConstructor - creates a Duration range defined by xJDFDurationRange(JDFDuration xmin, JDFDuration xmax) Constructor - creates a Duration range defined by xmin to xmax -
Method Summary
Modifier and TypeMethodDescriptionstatic JDFDurationRangecreateDurationRange(String duration) getLeft()getLeft - get the left of the two range deliminators xmin ~ xmaxprotected JDFDurationgetLeftString(int precision) getLowerValue - returns the lower value of the boundsgetRight()getRight - get the right of the two range deliminators xmin ~ xmaxprotected JDFDurationgetRightString(int precision) getUpperValue - returns the upper value of the boundsprotected voidinit(JDFDuration xmin, JDFDuration xmax) Initializationprotected booleaninObjectRange(Object other) booleaninRange - returns true if 'x' is within the range defined by 'this'booleanisPartOfRange - is range 'r' within this range?booleanisValid - validate the given StringvoidsetLeft - sets the left JDFDuration object of the rangevoidsetRight - sets the right JDFDuration object of the range
-
Constructor Details
-
JDFDurationRange
public JDFDurationRange()Empty range constructor -
JDFDurationRange
Constructor - creates a Duration range defined by x -
JDFDurationRange
Constructor - creates a Duration range defined by xmin to xmax -
JDFDurationRange
copy constructor -
JDFDurationRange
Construct a JDFDurationRange from a string- Throws:
DataFormatException- - if the String has not a valid format
-
-
Method Details
-
init
Initialization -
isValid
isValid - validate the given String- Parameters:
s- the given string- Returns:
- boolean - false if the String has not a valid format
-
inRange
inRange - returns true if 'x' is within the range defined by 'this'- Parameters:
x- JDFDuration that is to be compared with 'this'- Returns:
- boolean - true if 'x' is within the range defined by 'this'
-
isPartOfRange
isPartOfRange - is range 'r' within this range?- Specified by:
isPartOfRangein classJDFRange- Parameters:
r- the range to test- Returns:
- boolean - true if range 'r' is within this range, else false
-
getLeft
getLeft - get the left of the two range deliminators xmin ~ xmax- Returns:
- JDFDuration - the left value
-
getRight
getRight - get the right of the two range deliminators xmin ~ xmax- Returns:
- JDFDuration - the right value
-
setLeft
setLeft - sets the left JDFDuration object of the range- Parameters:
x- the left JDFDuration object of the range
-
setRight
setRight - sets the right JDFDuration object of the range- Parameters:
x- the right JDFDuration object of the range
-
getUpperValue
getUpperValue - returns the upper value of the bounds- Returns:
- JDFDuration - the upper value of the range
-
getLowerValue
getLowerValue - returns the lower value of the bounds- Returns:
- JDFDuration - the lower value of the range
-
getRightObject
- Specified by:
getRightObjectin classJDFRange
-
getLeftObject
- Specified by:
getLeftObjectin classJDFRange
-
inObjectRange
- Overrides:
inObjectRangein classJDFRange
-
getRightString
- Overrides:
getRightStringin classJDFRange
-
getLeftString
- Overrides:
getLeftStringin classJDFRange
-
createDurationRange
-