Modifier and Type | Field and Description |
---|---|
protected FieldList |
indexes |
protected ArrayList<Order> |
orders |
protected ArrayList<Class<? extends Comparable<?>>> |
types |
Constructor and Description |
---|
Ordering()
Creates an empty ordering.
|
Ordering(int index,
Class<? extends Comparable<?>> type,
Order order) |
Modifier and Type | Method and Description |
---|---|
Ordering |
appendOrdering(Integer index,
Class<? extends Comparable<?>> type,
Order order)
Extends this ordering by appending an additional order requirement.
|
Ordering |
clone() |
Ordering |
createNewOrderingUpToIndex(int exclusiveIndex)
Creates a new ordering the represents an ordering on a prefix of the fields.
|
boolean |
equals(Object obj) |
Integer |
getFieldNumber(int index) |
Order[] |
getFieldOrders() |
int[] |
getFieldPositions() |
boolean[] |
getFieldSortDirections() |
FieldList |
getInvolvedIndexes() |
int |
getNumberOfFields() |
Order |
getOrder(int index) |
Class<? extends Comparable<?>> |
getType(int index) |
Class<? extends Comparable<?>>[] |
getTypes() |
boolean |
groupsFields(FieldSet fields) |
int |
hashCode() |
boolean |
isMetBy(Ordering otherOrdering) |
boolean |
isOrderEqualOnFirstNFields(Ordering other,
int n) |
String |
toString() |
protected FieldList indexes
protected final ArrayList<Class<? extends Comparable<?>>> types
public Ordering()
public Ordering(int index, Class<? extends Comparable<?>> type, Order order)
index
- type
- order
- public Ordering appendOrdering(Integer index, Class<? extends Comparable<?>> type, Order order)
index
- Field index of the appended order requirement.type
- Type of the appended order requirement.order
- Order of the appended order requirement.public int getNumberOfFields()
public FieldList getInvolvedIndexes()
public Integer getFieldNumber(int index)
public Class<? extends Comparable<?>> getType(int index)
public Order getOrder(int index)
public Class<? extends Comparable<?>>[] getTypes()
public int[] getFieldPositions()
public Order[] getFieldOrders()
public boolean[] getFieldSortDirections()
public boolean isMetBy(Ordering otherOrdering)
public boolean isOrderEqualOnFirstNFields(Ordering other, int n)
public Ordering createNewOrderingUpToIndex(int exclusiveIndex)
0
, then there is no resulting
ordering and this method return null
.exclusiveIndex
- The index (exclusive) up to which to create the ordering.null
, if the prefix is
empty.public boolean groupsFields(FieldSet fields)
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.