public interface TimePacker
TimeDomain
and TimeIndex
.Modifier and Type | Method and Description |
---|---|
BasePeriodPattern |
getBasePeriodPattern()
Return the base period pattern.
|
int |
getBasePeriodSize()
Return the number of time points within a base period.
|
TimeIndex |
getBasePeriodStart(TimeIndex t)
Return the time index of the first time point in the base period containing
the time specified.
|
DayOfWeek |
getDayOfWeek(TimeIndex time)
Return the day of week for the given time.
|
SubPeriodPattern |
getSubPeriodPattern()
Return the sub period pattern.
|
long |
pack(TimeParts timeParts,
Adjustment adjust)
Pack the component elements of the time into a numeric time index.
|
TimeParts |
unpack(long time)
Unpack the numeric representation of time into its component elements.
|
boolean |
valid(long time,
boolean testOnly)
Return true if the numeric time index is valid for the domain.
|
BasePeriodPattern getBasePeriodPattern()
SubPeriodPattern getSubPeriodPattern()
int getBasePeriodSize()
TimeIndex getBasePeriodStart(TimeIndex t)
t
- a non-null time index, which must be from this time domainboolean valid(long time, boolean testOnly) throws T2Exception
time
- numeric time to validatetestOnly
- if true do not throw an exception when time is not validT2Exception
TimeParts unpack(long time)
time
- a numeric time indexlong pack(TimeParts timeParts, Adjustment adjust) throws T2Exception
timeParts
- a time parts objectadjust
- a non-null adjustment modeT2Exception
DayOfWeek getDayOfWeek(TimeIndex time) throws T2Exception
time
- a time indexT2Exception
Copyright © 2017. All rights reserved.