-
- 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 immutableTokenValuedobject. In addition to adding immutability to theTokenValuedcontract, implementations ofDataTokenalso implement a number of useful features:- a type-appropriate
Comparableinterface - 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).
DataTokens 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 booleanequals(Object obj)Indicates whether another object is equal to this token.inthashCode()Returns a hash code for the token.StringtoString()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 storeDataTokens inMaps.
-
hashCode
int hashCode()
Returns a hash code for the token. This value is guaranteed to be consistent with that returned byTokenConverter.asHashCode(TokenValued).
-
-