edu.stanford.nlp.time
Class SUTime.Time
java.lang.Object
edu.stanford.nlp.time.SUTime.Temporal
edu.stanford.nlp.time.SUTime.Time
- All Implemented Interfaces:
- FuzzyInterval.FuzzyComparable<SUTime.Time>, HasInterval<SUTime.Time>, java.io.Serializable, java.lang.Cloneable, java.lang.Comparable<SUTime.Time>
- Direct Known Subclasses:
- JollyDayHolidays.JollyHoliday, SUTime.GroundedTime, SUTime.InexactTime, SUTime.OrdinalTime, SUTime.PartialTime, SUTime.RefTime, SUTime.RelativeTime, SUTime.SimpleTime, SUTime.TimeWithRange
- Enclosing class:
- SUTime
public abstract static class SUTime.Time
- extends SUTime.Temporal
- implements FuzzyInterval.FuzzyComparable<SUTime.Time>, HasInterval<SUTime.Time>
Time represents a time point on some time scale.
It is the base class for representing various types of time points.
Typically, since most time scales have marks with certain granularity
each time point can be represented as an interval.
- See Also:
- Serialized Form
| Methods inherited from class edu.stanford.nlp.time.SUTime.Temporal |
addMod, addModApprox, getMod, getPeriod, getRange, getRange, getStandardTemporalType, getTfid, getTfidString, getTid, getTidString, getTimeLabel, getTimexAttributes, getTimexValue, includeTimexAltValue, isApprox, isRef, next, prev, resolve, setTimeZone, setTimeZone, toFormattedString, toISOString, toString |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
SUTime.Time
public SUTime.Time()
SUTime.Time
public SUTime.Time(SUTime.Time t)
isGrounded
public boolean isGrounded()
- Specified by:
isGrounded in class SUTime.Temporal
getTime
public SUTime.Time getTime()
- Specified by:
getTime in class SUTime.Temporal
getRange
public SUTime.Range getRange(int flags,
SUTime.Duration granularity)
- Specified by:
getRange in class SUTime.Temporal
getDuration
public SUTime.Duration getDuration()
- Specified by:
getDuration in class SUTime.Temporal
getGranularity
public SUTime.Duration getGranularity()
- Overrides:
getGranularity in class SUTime.Temporal
getInterval
public Interval<SUTime.Time> getInterval()
- Description copied from interface:
HasInterval
- Returns the interval
- Specified by:
getInterval in interface HasInterval<SUTime.Time>
- Returns:
- interval
isComparable
public boolean isComparable(SUTime.Time t)
- Description copied from interface:
FuzzyInterval.FuzzyComparable
- Returns whether this object is comparable with another object
- Specified by:
isComparable in interface FuzzyInterval.FuzzyComparable<SUTime.Time>
- Returns:
- Returns true if two objects are comparable, false otherwise
compareTo
public int compareTo(SUTime.Time t)
- Specified by:
compareTo in interface java.lang.Comparable<SUTime.Time>
hasTime
public boolean hasTime()
getTimexType
public SUTime.TimexType getTimexType()
- Overrides:
getTimexType in class SUTime.Temporal
contains
public boolean contains(SUTime.Time t)
add
public abstract SUTime.Time add(SUTime.Duration offset)
offset
public SUTime.Time offset(SUTime.Duration offset)
subtract
public SUTime.Time subtract(SUTime.Duration offset)
closest
public static SUTime.Time closest(SUTime.Time ref,
SUTime.Time... times)
distance
public static SUTime.Duration distance(SUTime.Time t1,
SUTime.Time t2)
difference
public static SUTime.Duration difference(SUTime.Time t1,
SUTime.Time t2)
makeComposite
public static SUTime.CompositePartialTime makeComposite(SUTime.PartialTime pt,
SUTime.Time t)
resolve
public SUTime.Temporal resolve(SUTime.Time t,
int flags)
- Specified by:
resolve in class SUTime.Temporal
intersect
public SUTime.Temporal intersect(SUTime.Temporal t)
- Overrides:
intersect in class SUTime.Temporal
intersect
protected SUTime.Time intersect(SUTime.Time t)
intersect
protected static SUTime.Time intersect(SUTime.Time t1,
SUTime.Time t2)
min
public static SUTime.Time min(SUTime.Time t1,
SUTime.Time t2)
max
public static SUTime.Time max(SUTime.Time t1,
SUTime.Time t2)
getJodaTimeInstant
public org.joda.time.Instant getJodaTimeInstant()
getJodaTimePartial
public org.joda.time.Partial getJodaTimePartial()
Stanford NLP Group