public interface TokenSequence extends TokenTyped
Modifier and Type | Method and Description |
---|---|
int |
compareElement(int index,
TokenValued value)
Compares the value of the specified token to the token at which
the given port is positioned.
|
int |
compareElements(int lhsIndex,
int rhsIndex)
Compares the values of the tokens at the specified
positions.
|
ElementComparator |
getElementComparator(TokenOrder sortOrder)
Gets an
ElementComparator for this sequence using
the specified ordering. |
TokenValued |
getToken(int index)
Gets the value at the specified position.
|
int |
hashCode(int index)
Gets the hash code for the token at the specified position.
|
boolean |
isNull(int index)
Indicates whether the specified token has a null value.
|
TokenValuedIterator |
newValueIterator()
Creates an iterator over the non-null values of this sequence.
|
int |
size()
Gets the length of the sequence.
|
String |
toString(int index)
Gets the string representation of the token at the specified
position.
|
getType
int size()
boolean isNull(int index)
index
- the index of the tokentrue
if the element is null,
false
otherwiseint compareElement(int index, TokenValued value)
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)
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)
ElementComparator
for this sequence using
the specified ordering.sortOrder
- the desired orderingElementComparator
for this sequence.TokenValued getToken(int index)
index
- the index of the tokenint hashCode(int index)
index
- the index of the tokenString toString(int index)
index
- the index of the tokenTokenValuedIterator newValueIterator()
Copyright © 2016 Actian Corporation. All rights reserved.