O - the type of Java object contained in the tokenpublic final class ObjectRegister<O> extends Object implements ScalarRegister, ObjectSettable<O>
ObjectValued object.| Constructor and Description |
|---|
ObjectRegister(ObjectTokenType<O> type)
Creates a new null-valued register of the specified object type.
|
| Modifier and Type | Method and Description |
|---|---|
O |
asObject()
Gets the contained Java object.
|
ObjectTokenType<O> |
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(O value)
Sets the container to the given object value.
|
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, isZeroisNullgetTypepublic ObjectRegister(ObjectTokenType<O> type)
type - the object type allowed as register valuespublic void setNull()
TokenSettablesetNull in interface TokenSettablepublic void setZero()
TokenSettablesetZero in interface TokenSettablepublic void set(O value)
ObjectSettableThe value is stored by reference. Therefore, the caller must guarantee that the provided object will not be modified subsequent to this call. Failure to comply may result in unexpected behavior.
set in interface ObjectSettable<O>value - object value to which to set the containerpublic void set(TokenValued value)
TokenSettableset in interface TokenSettablevalue - the value to which to set the containerpublic final ObjectTokenType<O> getType()
TokenValuedgetType in interface ObjectValued<O>getType in interface ScalarValuedgetType in interface TokenValuedgetType in interface ObjectTyped<O>getType in interface ScalarTypedgetType in interface TokenTypedpublic final O asObject()
ObjectValuedasObject in interface ObjectValued<O>TokenValued.isNull(), null is returned.public 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 © 2016 Actian Corporation. All rights reserved.