edu.stanford.nlp.time
Enum SUTime.TimeUnit
java.lang.Object
java.lang.Enum<SUTime.TimeUnit>
edu.stanford.nlp.time.SUTime.TimeUnit
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Comparable<SUTime.TimeUnit>
- Enclosing class:
- SUTime
public static enum SUTime.TimeUnit
- extends java.lang.Enum<SUTime.TimeUnit>
| Methods inherited from class java.lang.Enum |
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf |
| Methods inherited from class java.lang.Object |
getClass, notify, notifyAll, wait, wait, wait |
MILLIS
public static final SUTime.TimeUnit MILLIS
SECOND
public static final SUTime.TimeUnit SECOND
MINUTE
public static final SUTime.TimeUnit MINUTE
HOUR
public static final SUTime.TimeUnit HOUR
DAY
public static final SUTime.TimeUnit DAY
WEEK
public static final SUTime.TimeUnit WEEK
MONTH
public static final SUTime.TimeUnit MONTH
QUARTER
public static final SUTime.TimeUnit QUARTER
YEAR
public static final SUTime.TimeUnit YEAR
DECADE
public static final SUTime.TimeUnit DECADE
CENTURY
public static final SUTime.TimeUnit CENTURY
MILLENNIUM
public static final SUTime.TimeUnit MILLENNIUM
UNKNOWN
public static final SUTime.TimeUnit UNKNOWN
duration
protected SUTime.Duration duration
values
public static SUTime.TimeUnit[] values()
- Returns an array containing the constants of this enum type, in
the order they are declared. This method may be used to iterate
over the constants as follows:
for (SUTime.TimeUnit c : SUTime.TimeUnit.values())
System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in
the order they are declared
valueOf
public static SUTime.TimeUnit valueOf(java.lang.String name)
- Returns the enum constant of this type with the specified name.
The string must match exactly an identifier used to declare an
enum constant in this type. (Extraneous whitespace characters are
not permitted.)
- Parameters:
name - the name of the enum constant to be returned.
- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException - if this enum type has no constant
with the specified name
java.lang.NullPointerException - if the argument is null
getDuration
public SUTime.Duration getDuration()
getPeriod
public SUTime.Duration getPeriod()
getGranularity
public SUTime.Duration getGranularity()
createTemporal
public SUTime.Temporal createTemporal(int n)
Stanford NLP Group