public interface RecordTokenSequence extends TokenSequence, RecordTyped
TokenSequence
of composite tokens, representing record
data. A RecordTokenSequence
can be
thought of as rows of tokens or, equivalently, as a table of tokens. Tokens can be accessed
column-wise, as independent sequences, or row-wise, as elements.Modifier and Type | Method and Description |
---|---|
int |
columns()
Gets the number of columns in a record.
|
int |
compareElement(int index,
TokenValued value)
Compares the values of the specified row of tokens to the
tokens at which the given port is positioned.
|
int |
compareElements(int lhsIndex,
int rhsIndex)
Compares the values of the tokens at the specified
positions.
|
boolean |
containsNull(int index)
Determines if any column in the specified row is null valued.
|
ScalarTokenSequence |
getColumn(int index)
Gets the
ScalarTokenSequence containing the specified
column data. |
ElementComparator |
getElementComparator(SortKey... sortKeys)
Gets an
ElementComparator for the token array for the
fields with the given names and the given token orders. |
ElementComparator |
getElementComparator(TokenOrder... sortOrder)
Gets an ElementComparator for the token array and given ordering.
|
ElementComparator |
getElementComparator(TokenOrder sortOrder)
Gets an ElementComparator for the token array and given ordering.
|
RecordValued |
getToken(int index)
Gets the value at the specified position.
|
RecordValuedIterator |
newValueIterator()
Creates an iterator over the non-null values of this sequence.
|
hashCode, isNull, size, toString
getType
boolean containsNull(int index)
index
- the row to checktrue
if at least one column is null
valued, false
if none areint compareElement(int index, TokenValued value)
The source sequence must be composite and have the same number of columns as this sequence. All columns must be of comparable types.
compareElement
in interface TokenSequence
index
- the index of the tokenvalue
- the input port positioned at the token for
comparison0
if the values are equal,
1
if the sequence token value is greater,
-1
if the sequence token value is lesser.
A null value is greater than any other non-null;
two null values compare as equal.int compareElements(int lhsIndex, int rhsIndex)
TokenSequence
compareElements
in interface TokenSequence
lhsIndex
- the index of the left-hand elementrhsIndex
- the index of the right-hand element0
if the values are equal,
1
if the left hand value is greater,
-1
if the left hand value is lesser.
A null value is greater than any other non-null;
two null values compare as equal.ElementComparator getElementComparator(TokenOrder sortOrder)
getElementComparator
in interface TokenSequence
sortOrder
- the desired orderingElementComparator getElementComparator(TokenOrder... sortOrder)
sortOrder
- the desired orderingElementComparator
on this sequenceIllegalArgumentException
- if the ordering does not contain
the same number of values as there are columns.ElementComparator getElementComparator(SortKey... sortKeys)
ElementComparator
for the token array for the
fields with the given names and the given token orders.sortKeys
- list of key fields and sort order for eachElementComparator
on this sequenceIllegalArgumentException
- if the key field list does not
contain the same number of values as the sort order list.RecordValued getToken(int index)
TokenSequence
getToken
in interface TokenSequence
index
- the index of the tokenint columns()
ScalarTokenSequence getColumn(int index)
ScalarTokenSequence
containing the specified
column data.index
- the column sequence to get. Indexes are zero-based
and ordered identically to the fields in the
RecordTokenType
for this array.ScalarTokenSequence
containing the token
values for the column.RecordValuedIterator newValueIterator()
TokenSequence
newValueIterator
in interface TokenSequence
Copyright © 2020 Actian Corporation. All rights reserved.