|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.tools.ant.types.EnumeratedAttribute org.apache.tools.ant.types.TimeComparison
public class TimeComparison
EnumeratedAttribute for time comparisons. Accepts values "before", "after", "equal".
Field Summary | |
---|---|
static TimeComparison |
AFTER
After Comparison. |
static TimeComparison |
BEFORE
Before Comparison. |
static TimeComparison |
EQUAL
Equal Comparison. |
Fields inherited from class org.apache.tools.ant.types.EnumeratedAttribute |
---|
value |
Constructor Summary | |
---|---|
TimeComparison()
Default constructor. |
|
TimeComparison(java.lang.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. |
java.lang.String[] |
getValues()
Return the possible values. |
Methods inherited from class org.apache.tools.ant.types.EnumeratedAttribute |
---|
containsValue, getIndex, getInstance, getValue, indexOfValue, setValue, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final TimeComparison BEFORE
public static final TimeComparison AFTER
public static final TimeComparison EQUAL
Constructor Detail |
---|
public TimeComparison()
public TimeComparison(java.lang.String value)
value
- the EnumeratedAttribute value.Method Detail |
---|
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.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |