public final class PeriodRegister extends Object implements ScalarRegister, PeriodSettable
PeriodValued object.| Constructor and Description | 
|---|
| PeriodRegister()Creates a new null-valued register. | 
| Modifier and Type | Method and Description | 
|---|---|
| Period | asPeriod()Gets the contained Period value as a  java.time.Period. | 
| int | getDays()Gets the day portion of the contained period value. | 
| int | getMonths()Gets the month portion of the contained period value. | 
| ScalarTokenType | getType()Gets the data type of the token. | 
| int | getYears()Gets the year portion of the contained period value. | 
| boolean | isNull()Indicates whether the token is null valued. | 
| boolean | isZero()Indicates whether the value is the zero value
 for the type. | 
| void | set(int years,
   int months,
   int days)Sets the container to a directed period value specified as 
 years, months, and days. | 
| void | set(Period value)Sets the container to a period value specified as a 
  java.time.Periodobject. | 
| void | set(TokenValued value)Sets the contained value to the given token value. | 
| void | setNull()Sets the contained value to be null valued. | 
| void | setZero()Sets the contained value to be zero valued. | 
| String | toString() | 
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetType, isZeroisNullpublic void setNull()
TokenSettablesetNull in interface TokenSettablepublic void setZero()
TokenSettablesetZero in interface TokenSettablepublic void set(int years,
                int months,
                int days)
PeriodSettableset in interface PeriodSettableyears - number of years in periodmonths - number of months in perioddays - number of days in periodpublic void set(Period value)
PeriodSettablejava.time.Period object.set in interface PeriodSettablevalue - period value to which to set the containerpublic void set(TokenValued value)
TokenSettableset in interface TokenSettablevalue - the value to which to set the containerpublic final ScalarTokenType getType()
TokenValuedgetType in interface ScalarValuedgetType in interface TokenValuedgetType in interface ScalarTypedgetType in interface TokenTypedpublic int getYears()
PeriodValuedgetYears in interface PeriodValuedTokenValued.isNull(),
 0 is returned.public int getMonths()
PeriodValuedgetMonths in interface PeriodValuedTokenValued.isNull(),
 0 is returned.public int getDays()
PeriodValuedgetDays in interface PeriodValuedTokenValued.isNull(),
 0 is returned.public final Period asPeriod()
PeriodValuedjava.time.Period.asPeriod in interface PeriodValuedjava.time.Period.  If null valued,
 as indicated by TokenValued.isNull(), null
 is returned.public final boolean isZero()
ScalarValuedisZero in interface ScalarValuedtrue if the value is the zero value,
 false otherwise.public final boolean isNull()
TokenValuedisNull in interface TokenValuedtrue if the token is null valued,
 false otherwiseCopyright © 2020 Actian Corporation. All rights reserved.