public class TimeComparison extends EnumeratedAttribute
Modifier and Type | Field and Description |
---|---|
static TimeComparison |
AFTER
After Comparison.
|
static TimeComparison |
BEFORE
Before Comparison.
|
static TimeComparison |
EQUAL
Equal Comparison.
|
value
Constructor and Description |
---|
TimeComparison()
Default constructor.
|
TimeComparison(java.lang.String value)
Construct a new TimeComparison with the specified value.
|
Modifier and Type | Method and Description |
---|---|
static int |
compare(long t1,
long t2)
Compare two times.
|
static int |
compare(long t1,
long t2,
long g)
Compare two times.
|
boolean |
evaluate(long t1,
long t2)
Evaluate two times against this TimeComparison.
|
boolean |
evaluate(long t1,
long t2,
long g)
Evaluate two times against this TimeComparison.
|
java.lang.String[] |
getValues()
Return the possible values.
|
containsValue, getIndex, getInstance, getValue, indexOfValue, setValue, toString
public static final TimeComparison BEFORE
public static final TimeComparison AFTER
public static final TimeComparison EQUAL
public TimeComparison()
public TimeComparison(java.lang.String value)
value
- the EnumeratedAttribute value.public java.lang.String[] getValues()
getValues
in class EnumeratedAttribute
public boolean evaluate(long t1, long t2)
t1
- the first time to compare.t2
- the second time to compare.public boolean evaluate(long t1, long t2, long g)
t1
- the first time to compare.t2
- the second time to compare.g
- the timestamp granularity.public static int compare(long t1, long t2)
t1
- the first time to compare.t2
- the second time to compare.public static int compare(long t1, long t2, long g)
t1
- the first time to compare.t2
- the second time to compare.g
- the timestamp granularity.