public final class RecordToken extends AbstractRecordValued<ScalarToken> implements DataToken, Comparable<RecordToken>
RecordValued
object.
A RecordToken
can also be thought of as a row of tabular data.Constructor and Description |
---|
RecordToken(RecordTokenType type,
ScalarValued... fieldValues)
Constructs a new token with the specified field types, using the
field values in the given containers.
|
RecordToken(RecordValued value)
Constructs a new token with the composite value in the given container.
|
RecordToken(ScalarValued... fieldValues)
Constructs a new token using the field values in the given containers.
|
Modifier and Type | Method and Description |
---|---|
int |
compareTo(RecordToken that) |
boolean |
equals(Object obj)
Indicates whether another object is equal to this token.
|
int |
hashCode()
Returns a hash code for the token.
|
static RecordToken |
NULL(RecordTokenType recordType)
Create a new null valued record token of the specified type.
|
static RecordToken |
wrap(String name,
ScalarValued value)
Create a new record token with a single field with
the specified name and value.
|
static RecordToken |
ZERO(RecordTokenType recordType)
Create a new zero valued record token of the specified type.
|
containsNull, getConverter, getField, getField, getFields, getType, isNull, newFieldIterator, newFieldIterator, newFieldIterator, size, toString
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
getType, isNull
public RecordToken(RecordValued value)
value
- a RecordValued
containing the
desired valuepublic RecordToken(ScalarValued... fieldValues)
fieldValues
- the values for the fields of the composite token.public RecordToken(RecordTokenType type, ScalarValued... fieldValues)
The list of scalar values are expected in the same order as the fields in the provided type.
type
- the schema of the composite tokenfieldValues
- the values for the fields of the composite token.public static RecordToken NULL(RecordTokenType recordType)
recordType
- the record token type of the token to createpublic static RecordToken ZERO(RecordTokenType recordType)
recordType
- the record token type of the token to createpublic int compareTo(RecordToken that)
compareTo
in interface Comparable<RecordToken>
public boolean equals(Object obj)
DataToken
TokenComparator.equal(TokenValued,TokenValued)
but makes it possible to store DataToken
s in Map
s.public int hashCode()
DataToken
TokenConverter.asHashCode(TokenValued)
.public static RecordToken wrap(String name, ScalarValued value)
name
- the name of the single field in the resultvalue
- the value of the single field in the resultCopyright © 2024 Actian Corporation. All rights reserved.