public interface TokenConverter
TokenValued,
implementations are generally type specific, working on
only tokens of one type.TokenConverters| Modifier and Type | Method and Description |
|---|---|
int |
asHashCode()
Computes a hash code for the source token value.
|
Object |
asObject()
Creates an
Object representation of the source value. |
String |
asString()
Creates a string representation of the source value,
suitable for displaying to users.
|
DataToken |
asToken()
Creates an immutable copy of the source value.
|
void |
setSource(TokenValued value)
Sets the source value for this converter.
|
void setSource(TokenValued value)
value - the source of values to be convertedDataToken asToken()
Object asObject()
Object representation of the source value.
The type of the object returned depends on the token type.
| Token Type | Object Type |
|---|---|
| BINARY | byte array |
| BOOLEAN | Boolean |
| CHAR | Character |
| DATE | Date (time portion will be midnight) |
| DOUBLE | Double |
| ENUM | String |
| FLOAT | Float |
| INT | Integer |
| IP4ADDRESS | Inet4Address |
| IP6ADDRESS | Inet6Address |
| LONG | Long |
| NUMERIC | BigDecimal |
| OBJECT | Object |
| RECORD | Map |
| STRING | String |
| TIMESTAMP | Date (date portion will by January 1, 1970) |
| TIMESTAMP | Timestamp |
A null object reference is returned if the current token
value is null.
Object containing the current token valueString asString()
int asHashCode()
TokenComparator.equal()
will always generate the same hash code.Copyright © 2020 Actian Corporation. All rights reserved.