public class SimpleSubPeriodPattern extends Object implements SubPeriodPattern
| Constructor and Description |
|---|
SimpleSubPeriodPattern(Resolution basePeriod,
Resolution subPeriod,
int[] ranks)
Construct a sub period pattern with the given base period and sub period resolutions, and with
the given ranks.
|
| Modifier and Type | Method and Description |
|---|---|
long |
adjustForSubPeriod(long time,
Adjustment adjust,
TimeParts tp)
Modify and return the numeric time index corresponding to the state of the
time parts argument.
|
boolean |
equals(Object obj) |
TimeParts |
fillInSubPeriod(int subPeriod,
TimeParts tp)
Update the relevant field of the time parts argument for the given sub period
and return a modified copy.
|
Resolution |
getBasePeriod()
Return the base period resolution.
|
int |
getSize()
Return the number of sub periods.
|
Resolution |
getSubPeriod()
Return the sub period resolution.
|
int |
hashCode() |
String |
toString() |
public SimpleSubPeriodPattern(Resolution basePeriod, Resolution subPeriod, int[] ranks)
basePeriod - a non-null resolutionsubPeriod - a non-null resolutionranks - a non-null non-empty array of integerspublic int getSize()
SubPeriodPatterngetSize in interface SubPeriodPatternpublic Resolution getSubPeriod()
SubPeriodPatterngetSubPeriod in interface SubPeriodPatternpublic Resolution getBasePeriod()
SubPeriodPatterngetBasePeriod in interface SubPeriodPatternpublic long adjustForSubPeriod(long time,
Adjustment adjust,
TimeParts tp)
throws T2Exception
SubPeriodPatternTimePacker.pack(TimeParts, Adjustment).adjustForSubPeriod in interface SubPeriodPatterntime - a numeric time indexadjust - an allowed adjustment modetp - a time parts object with the complete time specificationT2Exceptionpublic TimeParts fillInSubPeriod(int subPeriod, TimeParts tp)
SubPeriodPatternTimePacker.unpack(long).fillInSubPeriod in interface SubPeriodPatternsubPeriod - a positive numbertp - a time parts object to be modifiedCopyright © 2017. All rights reserved.