-
- All Superinterfaces:
Serializable
,TokenTyped
,TokenValued
- All Known Subinterfaces:
ScalarToken
- All Known Implementing Classes:
BinaryToken
,BooleanToken
,CharToken
,DateToken
,DoubleToken
,DurationToken
,FloatToken
,IntToken
,Ip4AddressToken
,Ip6AddressToken
,LongToken
,MoneyToken
,NullToken
,NumericToken
,ObjectToken
,PeriodToken
,RecordToken
,StringToken
,TimestampToken
,TimeToken
public interface DataToken extends TokenValued, Serializable
An immutableTokenValued
object. In addition to adding immutability to theTokenValued
contract, implementations ofDataToken
also implement a number of useful features:- a type-appropriate
Comparable
interface - an overrides of
Object.hashCode()
consistent with the values returned byTokenConverter
. - an override of
Object.equals()
which considers null valued tokens equal, as opposed to to different (as inTokenComparator
).
DataToken
s a useful mechanism for general in-memory storage of token values.- See Also:
DataRegister
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
equals(Object obj)
Indicates whether another object is equal to this token.int
hashCode()
Returns a hash code for the token.String
toString()
Returns a string representation of the token's value.-
Methods inherited from interface com.pervasive.datarush.tokens.TokenValued
getType, isNull
-
-
-
-
Method Detail
-
equals
boolean equals(Object obj)
Indicates whether another object is equal to this token. Two null valued tokens are considered equal. This differs from the behavior ofTokenComparator.equal(TokenValued,TokenValued)
but makes it possible to storeDataToken
s inMap
s.
-
hashCode
int hashCode()
Returns a hash code for the token. This value is guaranteed to be consistent with that returned byTokenConverter.asHashCode(TokenValued)
.
-
-