org.apache.tools.ant.types
public class TimeComparison extends EnumeratedAttribute
Since: Ant 1.7
Field Summary | |
---|---|
static TimeComparison | AFTER After Comparison. |
static TimeComparison | BEFORE Before Comparison. |
static TimeComparison | EQUAL Equal Comparison. |
Constructor Summary | |
---|---|
TimeComparison()
Default constructor. | |
TimeComparison(String value)
Construct a new TimeComparison with the specified value. |
Method Summary | |
---|---|
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. |
String[] | getValues()
Return the possible values. |
Parameters: value the EnumeratedAttribute value.
Parameters: t1 the first time to compare. t2 the second time to compare.
Returns: a negative integer, a positive integer, or zero as t1 is before, after, or equal to t2 accounting for the default granularity.
Parameters: t1 the first time to compare. t2 the second time to compare. g the timestamp granularity.
Returns: a negative integer, a positive integer, or zero as t1 is before, after, or equal to t2 accounting for the specified granularity.
Parameters: t1 the first time to compare. t2 the second time to compare.
Returns: true if the comparison result fell within the parameters of this TimeComparison.
Parameters: t1 the first time to compare. t2 the second time to compare. g the timestamp granularity.
Returns: true if the comparison result fell within the parameters of this TimeComparison.
Returns: String[] of EnumeratedAttribute values.