Interface PeriodValued

All Superinterfaces:
ScalarTyped, ScalarValued, TokenTyped, TokenValued
All Known Subinterfaces:
PeriodInputField, PeriodValuedIterator
All Known Implementing Classes:
NullToken, PeriodRegister, PeriodToken

public interface PeriodValued extends ScalarValued
A TokenValued object containing a Period value.
See Also:
  • TokenTypeConstant#PERIOD
  • Method Summary

    Modifier and Type
    Method
    Description
    Gets the contained Period value as a java.time.Period.
    int
    Gets the day portion of the contained period value.
    int
    Gets the month portion of the contained period value.
    int
    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 Details

    • asPeriod

      Period asPeriod()
      Gets the contained Period value as a java.time.Period.
      Returns:
      the contained value as a java.time.Period. If null valued, as indicated by TokenValued.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.