-
- All Superinterfaces:
ScalarTyped
,ScalarValued
,TokenTyped
,TokenValued
- All Known Subinterfaces:
PeriodInputField
,PeriodValuedIterator
- All Known Implementing Classes:
NullToken
,PeriodRegister
,PeriodToken
public interface PeriodValued extends ScalarValued
ATokenValued
object containing a Period value.- See Also:
TokenTypeConstant#PERIOD
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Period
asPeriod()
Gets the contained Period value as ajava.time.Period
.int
getDays()
Gets the day portion of the contained period value.int
getMonths()
Gets the month portion of the contained period value.int
getYears()
Gets the year portion of the contained period value.-
Methods inherited from interface com.pervasive.datarush.tokens.scalar.ScalarValued
getType, isZero
-
Methods inherited from interface com.pervasive.datarush.tokens.TokenValued
isNull
-
-
-
-
Method Detail
-
asPeriod
Period asPeriod()
Gets the contained Period value as ajava.time.Period
.- Returns:
- the contained value as a
java.time.Period
. If null valued, as indicated byTokenValued.isNull()
,null
is returned.
-
getYears
int getYears()
Gets the year portion of the contained period value.- Returns:
- the year portion of the contained value
If null valued, as indicated by
TokenValued.isNull()
,0
is returned.
-
getMonths
int getMonths()
Gets the month portion of the contained period value. This does not include the year portion.- Returns:
- the month portion of the contained value
If null valued, as indicated by
TokenValued.isNull()
,0
is returned.
-
getDays
int getDays()
Gets the day portion of the contained period value. This does not include the year or month portion.- Returns:
- the day portion of the contained value
If null valued, as indicated by
TokenValued.isNull()
,0
is returned.
-
-