public class JDFDateTimeRange extends JDFRange
JDFBaseDataTypes.EnumFitsValue
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 |
---|
JDFDateTimeRange()
Empty range constructor
|
JDFDateTimeRange(JDFDate x)
Constructor - creates a DateTime range defined by x ("from x to x")
|
JDFDateTimeRange(JDFDate xmin,
JDFDate xmax)
Constructor - creates a DateTime range defined by xmin and xmax
|
JDFDateTimeRange(JDFDateTimeRange r)
copy constructor
|
JDFDateTimeRange(String s)
Construct a JDFDateTimeRange from a string
|
Modifier and Type | Method and Description |
---|---|
static JDFDateTimeRange |
createDateTimeRange(String date)
factory style constructor that catches all exceptions and returns null if date is invalid
|
JDFDate |
getLeft()
getLeft - get the left of the two range deliminators xmin ~ xmax
|
protected Object |
getLeftObject() |
JDFDate |
getLowerValue()
getLowerValue - returns the lower value of the bounds
|
JDFDate |
getRight()
getRight - get the right of the two range deliminators xmin ~ xmax
|
protected Object |
getRightObject() |
JDFDate |
getUpperValue()
getUpperValue - returns the upper value of the bounds
|
int |
hashCode()
hashCode complements equals() to fulfill the equals/hashCode contract
|
protected void |
init(JDFDate xmin,
JDFDate xmax)
Initialization
|
protected boolean |
inObjectRange(Object other) |
boolean |
inRange(JDFDate x)
inRange - returns true if 'x' is within the range defined by 'this'
|
boolean |
isPartOfRange(JDFRange ra)
isPartOfRange - is range 'r' within this range?
|
boolean |
isValid(String s)
isValid - validate the given String
|
void |
setLeft(JDFDate x)
setLeft - sets the left JDFDate object of the range
|
void |
setRight(JDFDate x)
setRight - sets the right JDFDate object of the range
|
String |
toString()
toString
|
public JDFDateTimeRange()
public JDFDateTimeRange(JDFDate x)
x
- boundary of the date/time rangepublic JDFDateTimeRange(JDFDate xmin, JDFDate xmax)
xmin
- xmax
- public JDFDateTimeRange(JDFDateTimeRange r)
r
- public JDFDateTimeRange(String s) throws DataFormatException
s
- DataFormatException
- - if the String has not a valid formatpublic static JDFDateTimeRange createDateTimeRange(String date)
date
- the formatted date stringpublic boolean isValid(String s)
s
- the given stringpublic int hashCode()
public boolean inRange(JDFDate x)
x
- JDFDate that is to be compared with 'this'public boolean isPartOfRange(JDFRange ra)
isPartOfRange
in class JDFRange
ra
- the range to testpublic JDFDate getLeft()
public JDFDate getRight()
public void setLeft(JDFDate x)
x
- the left JDFDate object of the rangepublic void setRight(JDFDate x)
x
- the right JDFDate object of the rangepublic JDFDate getUpperValue()
public JDFDate getLowerValue()
protected Object getRightObject()
getRightObject
in class JDFRange
protected Object getLeftObject()
getLeftObject
in class JDFRange
protected boolean inObjectRange(Object other)
inObjectRange
in class JDFRange
Copyright © 2018. All rights reserved.