org.cip4.jdflib.datatypes
Class JDFDateTimeRange

java.lang.Object
  extended by org.cip4.jdflib.datatypes.JDFRange
      extended by org.cip4.jdflib.datatypes.JDFDateTimeRange
All Implemented Interfaces:
JDFBaseDataTypes

public class JDFDateTimeRange
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
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
 
Method Summary
 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
 
Methods inherited from class org.cip4.jdflib.datatypes.JDFRange
equals, getString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JDFDateTimeRange

public JDFDateTimeRange()
Empty range constructor


JDFDateTimeRange

public JDFDateTimeRange(JDFDate x)
Constructor - creates a DateTime range defined by x ("from x to x")

Parameters:
x - boundary of the date/time range

JDFDateTimeRange

public JDFDateTimeRange(JDFDate xmin,
                        JDFDate xmax)
Constructor - creates a DateTime range defined by xmin and xmax

Parameters:
xmin -
xmax -

JDFDateTimeRange

public JDFDateTimeRange(JDFDateTimeRange r)
copy constructor


JDFDateTimeRange

public JDFDateTimeRange(String s)
                 throws DataFormatException
Construct a JDFDateTimeRange from a string

Throws:
DataFormatException - - if the String has not a valid format
Method Detail

init

protected void init(JDFDate xmin,
                    JDFDate xmax)
Initialization


toString

public String toString()
toString

Overrides:
toString in class Object
Returns:
String

isValid

public boolean isValid(String s)
isValid - validate the given String

Parameters:
s - the given string
Returns:
boolean - false if the String has not a valid format

hashCode

public int hashCode()
hashCode complements equals() to fulfill the equals/hashCode contract

Overrides:
hashCode in class JDFRange
Returns:
int

inRange

public boolean inRange(JDFDate x)
inRange - returns true if 'x' is within the range defined by 'this'

Parameters:
x - JDFDate 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:
isPartOfRange in class JDFRange
Parameters:
r - the range to test
Returns:
boolean - true if range 'r' is within this range, else false

getLeft

public JDFDate getLeft()
getLeft - get the left of the two range deliminators xmin ~ xmax

Returns:
JDFDate - the left value

getRight

public JDFDate getRight()
getRight - get the right of the two range deliminators xmin ~ xmax

Returns:
JDFDate - the right value

setLeft

public void setLeft(JDFDate x)
setLeft - sets the left JDFDate object of the range

Parameters:
x - the left JDFDate object of the range

setRight

public void setRight(JDFDate x)
setRight - sets the right JDFDate object of the range

Parameters:
x - the right JDFDate object of the range

getUpperValue

public JDFDate getUpperValue()
getUpperValue - returns the upper value of the bounds

Returns:
JDFDate - the upper value of the range

getLowerValue

public JDFDate getLowerValue()
getLowerValue - returns the lower value of the bounds

Returns:
JDFDate - the lower value of the range

getRightObject

protected Object getRightObject()
Specified by:
getRightObject in class JDFRange

getLeftObject

protected Object getLeftObject()
Specified by:
getLeftObject in class JDFRange

inObjectRange

protected boolean inObjectRange(Object other)
Overrides:
inObjectRange in class JDFRange


Copyright © 2013. All Rights Reserved.