Package ise.antelope.tasks
Class TimeUnit
java.lang.Object
org.apache.tools.ant.types.EnumeratedAttribute
ise.antelope.tasks.TimeUnit
public class TimeUnit
extends org.apache.tools.ant.types.EnumeratedAttribute
The enumeration of units: millisecond, second, minute, hour, day, week,
month, year.
- Version:
- $Revision: 132 $
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
static final TimeUnit
static final String
static final TimeUnit
static final String
static final TimeUnit
static unit objects, for use as sensible defaultsstatic final String
static final TimeUnit
static final String
static final String
static final TimeUnit
static final String
static final TimeUnit
static final String
Fields inherited from class org.apache.tools.ant.types.EnumeratedAttribute
value
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlong
Gets the multiplier attribute of the TimeUnit objectString[]
Gets the values attribute of the TimeUnit objectprotected void
setValueProgrammatically
(String value) set the inner value programmatically.long
toMillis
(long numberOfUnits) convert the time in the current unit, to millisMethods inherited from class org.apache.tools.ant.types.EnumeratedAttribute
containsValue, getIndex, getInstance, getValue, indexOfValue, setValue, toString
-
Field Details
-
MILLISECOND
- See Also:
-
SECOND
- See Also:
-
MINUTE
- See Also:
-
HOUR
- See Also:
-
DAY
- See Also:
-
WEEK
- See Also:
-
MONTH
- See Also:
-
YEAR
- See Also:
-
MILLISECOND_UNIT
static unit objects, for use as sensible defaults -
SECOND_UNIT
-
MINUTE_UNIT
-
HOUR_UNIT
-
DAY_UNIT
-
WEEK_UNIT
-
-
Constructor Details
-
TimeUnit
public TimeUnit()Constructor for TimeUnit
-
-
Method Details
-
setValueProgrammatically
set the inner value programmatically.- Parameters:
value
- to set
-
getMultiplier
public long getMultiplier()Gets the multiplier attribute of the TimeUnit object- Returns:
- The multiplier value
-
getValues
Gets the values attribute of the TimeUnit object- Specified by:
getValues
in classorg.apache.tools.ant.types.EnumeratedAttribute
- Returns:
- The values value
-
toMillis
public long toMillis(long numberOfUnits) convert the time in the current unit, to millis- Parameters:
numberOfUnits
- long expressed in the current objects units- Returns:
- long representing the value in millis
-