com.caucho.util
Enum TimeInterval.Comparison

java.lang.Object
  extended by java.lang.Enum<TimeInterval.Comparison>
      extended by com.caucho.util.TimeInterval.Comparison
All Implemented Interfaces:
ComparableElement.Comparison<TimeInterval>, java.io.Serializable, java.lang.Comparable<TimeInterval.Comparison>
Enclosing interface:
TimeInterval

public static enum TimeInterval.Comparison
extends java.lang.Enum<TimeInterval.Comparison>
implements ComparableElement.Comparison<TimeInterval>

Defines the set of relationships between two time intervals.


Enum Constant Summary
CONTAINS
           
ENDS_DURING
           
EQUAL
           
FOLLOWS
           
FOLLOWS_IMMEDIATELY
           
IS_CONTAINED
           
PRECEDES
           
PRECEDES_IMMEDIATELY
           
STARTS_DURING
           
 
Method Summary
static TimeInterval.Comparison comparison(TimeInterval a, TimeInterval b)
          Provides a comparsion of two time intervals.
 int value()
          Implements the required method.
static TimeInterval.Comparison valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static TimeInterval.Comparison[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

PRECEDES

public static final TimeInterval.Comparison PRECEDES

PRECEDES_IMMEDIATELY

public static final TimeInterval.Comparison PRECEDES_IMMEDIATELY

ENDS_DURING

public static final TimeInterval.Comparison ENDS_DURING

CONTAINS

public static final TimeInterval.Comparison CONTAINS

IS_CONTAINED

public static final TimeInterval.Comparison IS_CONTAINED

EQUAL

public static final TimeInterval.Comparison EQUAL

STARTS_DURING

public static final TimeInterval.Comparison STARTS_DURING

FOLLOWS_IMMEDIATELY

public static final TimeInterval.Comparison FOLLOWS_IMMEDIATELY

FOLLOWS

public static final TimeInterval.Comparison FOLLOWS
Method Detail

values

public static TimeInterval.Comparison[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (TimeInterval.Comparison c : TimeInterval.Comparison.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static TimeInterval.Comparison valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
java.lang.NullPointerException - if the argument is null

value

public int value()
Implements the required method.

Specified by:
value in interface ComparableElement.Comparison<TimeInterval>

comparison

public static TimeInterval.Comparison comparison(TimeInterval a,
                                                 TimeInterval b)
Provides a comparsion of two time intervals.