public class LetoPeriodBean extends java.lang.Object implements LetoPeriod
Constructor and Description |
---|
LetoPeriodBean() |
Modifier and Type | Method and Description |
---|---|
long |
getAbsoluteNumber()
The absolute value of the period from the beginning of the calendar (from the calendar EPOCH).
|
java.lang.String |
getActualName()
Return the string representation of the value of this period or null if there is only an integer
representation.
|
long |
getNumber()
Return the number representation of the value of this period.
|
LetoPeriodStructure |
getStructure()
Returns the substructure of this period.
For example the period type "month" in Gregorian calendar, we have 4 possible structures: Month with 28 days - this is the February month in non-leap years Month with 29 days - this is the February month in leap years Month with 30 days Month with 31 days Each of these possible structures is represended as a LetoPeriodStructure that is returned by method getPossibleStructures() in LetoPeriodType. Since this LetoPeriod object represents a specific instance of the period - it refers to exactly one of the possible strucures. |
LetoPeriodType |
getType()
Return the period type this LetoPeriod maps to.
|
void |
setAbsoluteNumber(long absoluteNumber) |
void |
setActualName(java.lang.String name) |
void |
setNumber(long number) |
void |
setStartAtDaysAfterEpoch(long days) |
void |
setStructure(LetoPeriodStructure structure) |
void |
setType(LetoPeriodType type) |
long |
startsAtDaysAfterEpoch()
How much days have elapsed after the beginning of the callendar till the beginning of this LetoPeriod.
|
public void setStartAtDaysAfterEpoch(long days)
public void setAbsoluteNumber(long absoluteNumber)
public long getAbsoluteNumber()
LetoPeriod
getAbsoluteNumber
in interface LetoPeriod
public void setActualName(java.lang.String name) throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentException
public java.lang.String getActualName()
LetoPeriod
getActualName
in interface LetoPeriod
LetoPeriod.getNumber()
public void setNumber(long number)
public long getNumber()
LetoPeriod
getAbsoluteNumber()
. getActualName()
method.getNumber
in interface LetoPeriod
LetoPeriod.getActualName()
public void setType(LetoPeriodType type)
public LetoPeriodType getType()
LetoPeriod
getType
in interface LetoPeriod
public void setStructure(LetoPeriodStructure structure)
public LetoPeriodStructure getStructure()
LetoPeriod
getStructure
in interface LetoPeriod
LetoPeriodType
,
LetoPeriodType.getPossibleStructures()
public long startsAtDaysAfterEpoch()
LetoPeriod
startsAtDaysAfterEpoch
in interface LetoPeriod