public class TokenComparators extends Object
TokenComparator
objects.Modifier and Type | Method and Description |
---|---|
static TokenComparator |
getComparator(TokenType type)
Creates a comparator appropriate for the given type.
|
static TokenComparator |
getComparator(TokenType type,
TokenOrder order)
Creates a comparator appropriate for the given type ordered in
the specified direction.
|
static TokenComparator |
getComparator(TokenValued left,
TokenValued right)
Creates a comparator, bound to the given left and right values.
|
static RecordTokenComparator |
getCompositeComparator(ScalarTokenType[] types,
TokenOrder order)
Creates a composite comparator appropriate for the given types
ordered in the specified direction.
|
static RecordTokenComparator |
getCompositeComparator(ScalarTokenType[] types,
TokenOrder[] order)
Creates a composite comparator appropriate for the given types
ordered in the specified direction for each field.
|
static RecordTokenComparator |
getCompositeComparator(ScalarValued[] left,
ScalarValued[] right,
TokenOrder order)
Creates a composite comparator, bound to the given sets of left and right values,
using the specified ordering for all pairings of values.
|
static RecordTokenComparator |
getCompositeComparator(ScalarValued[] left,
ScalarValued[] right,
TokenOrder[] order)
Creates a composite comparator, bound to the given sets of left and right values,
using the specified orderings for each pairing of values.
|
public static TokenComparator getComparator(TokenType type)
type
- the token type for which to create a comparatorpublic static TokenComparator getComparator(TokenValued left, TokenValued right)
left
- the value to bind to the left operand in comparisonsright
- the value to bind to the right operand in comparisonspublic static TokenComparator getComparator(TokenType type, TokenOrder order)
type
- the token type for which to create a comparatororder
- the direction of the orderingpublic static RecordTokenComparator getCompositeComparator(ScalarTokenType[] types, TokenOrder order)
types
- the token types of individual fields. The comparator
will expect values in the same order as the argument.order
- the direction of the ordering. All fields will be compared
under this ordering.public static RecordTokenComparator getCompositeComparator(ScalarValued[] left, ScalarValued[] right, TokenOrder order)
left
- the set of values to bind to the fields of the left operand in comparisonsright
- the set of values to bind to the fields of the right operand in comparisonsorder
- the ordering for all fieldspublic static RecordTokenComparator getCompositeComparator(ScalarTokenType[] types, TokenOrder[] order)
types
- the token types of individual fields. The comparator
will expect values in the same order as the argument.order
- the direction of the orderings for each field.public static RecordTokenComparator getCompositeComparator(ScalarValued[] left, ScalarValued[] right, TokenOrder[] order)
left
- the set of values to bind to the fields of the left operand in comparisonsright
- the set of values to bind to the fields of the right operand in comparisonsorder
- the set of orderings for each fieldCopyright © 2020 Actian Corporation. All rights reserved.