public final class TimeRegister extends Object implements ScalarRegister, TimeSettable
TimeValued object.| Constructor and Description |
|---|
TimeRegister()
Creates a new null-valued register.
|
| Modifier and Type | Method and Description |
|---|---|
int |
asDayMillis()
Gets the contained time value as the number of milliseconds
elapsed since midnight.
|
TimeOfDay |
asTimeOfDay()
Gets the contained time value.
|
ScalarTokenType |
getType()
Gets the data type of the token.
|
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 millis)
Sets the container to a time value specified as the number of milliseconds
since midnight.
|
void |
set(TimeOfDay time)
Sets the container to the specified time of day.
|
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 millis)
TimeSettableset in interface TimeSettablemillis - time value to which to set the container, expressed as the
number of milliseconds since midnightpublic void set(TimeOfDay time)
TimeSettableset in interface TimeSettabletime - the time 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 final int asDayMillis()
TimeValuedasDayMillis in interface TimeValuedTokenValued.isNull(),
0 is returned.public final TimeOfDay asTimeOfDay()
TimeValuedasTimeOfDay in interface TimeValuedTokenValued.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 © 2024 Actian Corporation. All rights reserved.