public class TimeUnit
extends org.apache.tools.ant.types.EnumeratedAttribute
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
DAY |
static TimeUnit |
DAY_UNIT |
static java.lang.String |
HOUR |
static TimeUnit |
HOUR_UNIT |
static java.lang.String |
MILLISECOND |
static TimeUnit |
MILLISECOND_UNIT
static unit objects, for use as sensible defaults
|
static java.lang.String |
MINUTE |
static TimeUnit |
MINUTE_UNIT |
static java.lang.String |
MONTH |
static java.lang.String |
SECOND |
static TimeUnit |
SECOND_UNIT |
static java.lang.String |
WEEK |
static TimeUnit |
WEEK_UNIT |
static java.lang.String |
YEAR |
Constructor and Description |
---|
TimeUnit()
Constructor for TimeUnit
|
Modifier and Type | Method and Description |
---|---|
long |
getMultiplier()
Gets the multiplier attribute of the TimeUnit object
|
java.lang.String[] |
getValues()
Gets the values attribute of the TimeUnit object
|
protected void |
setValueProgrammatically(java.lang.String value)
set the inner value programmatically.
|
long |
toMillis(long numberOfUnits)
convert the time in the current unit, to millis
|
public static final java.lang.String MILLISECOND
public static final java.lang.String SECOND
public static final java.lang.String MINUTE
public static final java.lang.String HOUR
public static final java.lang.String DAY
public static final java.lang.String WEEK
public static final java.lang.String MONTH
public static final java.lang.String YEAR
public static final TimeUnit MILLISECOND_UNIT
public static final TimeUnit SECOND_UNIT
public static final TimeUnit MINUTE_UNIT
public static final TimeUnit HOUR_UNIT
public static final TimeUnit DAY_UNIT
public static final TimeUnit WEEK_UNIT
protected void setValueProgrammatically(java.lang.String value)
value
- to setpublic long getMultiplier()
public java.lang.String[] getValues()
getValues
in class org.apache.tools.ant.types.EnumeratedAttribute
public long toMillis(long numberOfUnits)
numberOfUnits
- long expressed in the current objects units