Package org.cip4.jdflib.datatypes
Class JDFDurationRange
- java.lang.Object
-
- org.cip4.jdflib.datatypes.JDFRange
-
- org.cip4.jdflib.datatypes.JDFDurationRange
-
- All Implemented Interfaces:
JDFBaseDataTypes
public class JDFDurationRange extends JDFRange
-
-
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
Constructors Constructor Description JDFDurationRange()Empty range constructorJDFDurationRange(java.lang.String s)Construct a JDFDurationRange from a stringJDFDurationRange(JDFDurationRange r)copy constructorJDFDurationRange(JDFDuration x)Constructor - creates a Duration range defined by xJDFDurationRange(JDFDuration xmin, JDFDuration xmax)Constructor - creates a Duration range defined by xmin to xmax
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static JDFDurationRangecreateDurationRange(java.lang.String duration)JDFDurationgetLeft()getLeft - get the left of the two range deliminators xmin ~ xmaxprotected JDFDurationgetLeftObject()java.lang.StringgetLeftString(int precision)JDFDurationgetLowerValue()getLowerValue - returns the lower value of the boundsJDFDurationgetRight()getRight - get the right of the two range deliminators xmin ~ xmaxprotected JDFDurationgetRightObject()java.lang.StringgetRightString(int precision)JDFDurationgetUpperValue()getUpperValue - returns the upper value of the boundsprotected voidinit(JDFDuration xmin, JDFDuration xmax)Initializationprotected booleaninObjectRange(java.lang.Object other)booleaninRange(JDFDuration x)inRange - returns true if 'x' is within the range defined by 'this'booleanisPartOfRange(JDFRange ra)isPartOfRange - is range 'r' within this range?booleanisValid(java.lang.String s)isValid - validate the given StringvoidsetLeft(JDFDuration x)setLeft - sets the left JDFDuration object of the rangevoidsetRight(JDFDuration x)setRight - sets the right JDFDuration object of the range
-
-
-
Constructor Detail
-
JDFDurationRange
public JDFDurationRange()
Empty range constructor
-
JDFDurationRange
public JDFDurationRange(JDFDuration x)
Constructor - creates a Duration range defined by x
-
JDFDurationRange
public JDFDurationRange(JDFDuration xmin, JDFDuration xmax)
Constructor - creates a Duration range defined by xmin to xmax
-
JDFDurationRange
public JDFDurationRange(JDFDurationRange r)
copy constructor
-
JDFDurationRange
public JDFDurationRange(java.lang.String s) throws java.util.zip.DataFormatExceptionConstruct a JDFDurationRange from a string- Throws:
java.util.zip.DataFormatException- - if the String has not a valid format
-
-
Method Detail
-
init
protected void init(JDFDuration xmin, JDFDuration xmax)
Initialization
-
isValid
public boolean isValid(java.lang.String s)
isValid - validate the given String- Parameters:
s- the given string- Returns:
- boolean - false if the String has not a valid format
-
inRange
public boolean inRange(JDFDuration x)
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
public boolean isPartOfRange(JDFRange ra)
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
public JDFDuration getLeft()
getLeft - get the left of the two range deliminators xmin ~ xmax- Returns:
- JDFDuration - the left value
-
getRight
public JDFDuration getRight()
getRight - get the right of the two range deliminators xmin ~ xmax- Returns:
- JDFDuration - the right value
-
setLeft
public void setLeft(JDFDuration x)
setLeft - sets the left JDFDuration object of the range- Parameters:
x- the left JDFDuration object of the range
-
setRight
public void setRight(JDFDuration x)
setRight - sets the right JDFDuration object of the range- Parameters:
x- the right JDFDuration object of the range
-
getUpperValue
public JDFDuration getUpperValue()
getUpperValue - returns the upper value of the bounds- Returns:
- JDFDuration - the upper value of the range
-
getLowerValue
public JDFDuration getLowerValue()
getLowerValue - returns the lower value of the bounds- Returns:
- JDFDuration - the lower value of the range
-
getRightObject
protected JDFDuration getRightObject()
- Specified by:
getRightObjectin classJDFRange
-
getLeftObject
protected JDFDuration getLeftObject()
- Specified by:
getLeftObjectin classJDFRange
-
inObjectRange
protected boolean inObjectRange(java.lang.Object other)
- Overrides:
inObjectRangein classJDFRange
-
getRightString
public java.lang.String getRightString(int precision)
- Overrides:
getRightStringin classJDFRange
-
getLeftString
public java.lang.String getLeftString(int precision)
- Overrides:
getLeftStringin classJDFRange
-
createDurationRange
public static JDFDurationRange createDurationRange(java.lang.String duration)
-
-