- All Superinterfaces:
ScalarTyped,ScalarValued,TokenTyped,TokenValued
- All Known Subinterfaces:
PeriodInputField,PeriodValuedIterator
- All Known Implementing Classes:
NullToken,PeriodRegister,PeriodToken
A
TokenValued object containing a Period value.- See Also:
-
TokenTypeConstant#PERIOD
-
Method Summary
Methods inherited from interface com.pervasive.datarush.tokens.scalar.ScalarValued
getType, isZeroMethods inherited from interface com.pervasive.datarush.tokens.TokenValued
isNull
-
Method Details
-
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(),nullis 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(),0is 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(),0is 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(),0is returned.
-