-
- All Superinterfaces:
ScalarTyped,ScalarValued,TokenTyped,TokenValued
- All Known Subinterfaces:
PeriodInputField,PeriodValuedIterator
- All Known Implementing Classes:
NullToken,PeriodRegister,PeriodToken
public interface PeriodValued extends ScalarValued
ATokenValuedobject containing a Period value.- See Also:
TokenTypeConstant#PERIOD
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description PeriodasPeriod()Gets the contained Period value as ajava.time.Period.intgetDays()Gets the day portion of the contained period value.intgetMonths()Gets the month portion of the contained period value.intgetYears()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(),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.
-
-