public class TimeInstant extends Object
Some examples of time instants are:
| Modifier and Type | Class and Description |
|---|---|
static class |
TimeInstant.TimeMode |
| Modifier and Type | Field and Description |
|---|---|
static Date |
START_TIME |
| Constructor and Description |
|---|
TimeInstant() |
TimeInstant(TimeInstant.TimeMode timeMode,
DateIntervalType intervalType,
Month firstMonthOfYear,
TimeAmount timeAmount) |
| Modifier and Type | Method and Description |
|---|---|
protected Date |
calculateStartTime() |
TimeInstant |
cloneInstance() |
Month |
getFirstMonthOfYear() |
DateIntervalType |
getIntervalType() |
Date |
getStartTime() |
TimeAmount |
getTimeAmount() |
Date |
getTimeInstant() |
TimeInstant.TimeMode |
getTimeMode() |
static TimeInstant |
now()
Return a time instant representing the current time.
|
static TimeInstant |
parse(String timeInstantExpr)
Parses a time instant expression.
|
void |
setFirstMonthOfYear(Month firstMonthOfYear) |
void |
setIntervalType(DateIntervalType intervalType) |
void |
setStartTime(Date now) |
void |
setTimeAmount(TimeAmount timeAmount) |
void |
setTimeMode(TimeInstant.TimeMode timeMode) |
String |
toString() |
public static Date START_TIME
public TimeInstant()
public TimeInstant(TimeInstant.TimeMode timeMode, DateIntervalType intervalType, Month firstMonthOfYear, TimeAmount timeAmount)
public TimeInstant.TimeMode getTimeMode()
public void setTimeMode(TimeInstant.TimeMode timeMode)
public DateIntervalType getIntervalType()
public void setIntervalType(DateIntervalType intervalType)
public Month getFirstMonthOfYear()
public void setFirstMonthOfYear(Month firstMonthOfYear)
public TimeAmount getTimeAmount()
public void setTimeAmount(TimeAmount timeAmount)
public TimeInstant cloneInstance()
public Date getTimeInstant()
public void setStartTime(Date now)
public Date getStartTime()
protected Date calculateStartTime()
public static TimeInstant now()
public static TimeInstant parse(String timeInstantExpr)
timeInstantExpr - A valid time instant expression (see TimeInstant class javadoc)IllegalArgumentException - If the expression is not validCopyright © 2017–2020 JBoss by Red Hat. All rights reserved.