public class SortOrder
extends java.lang.Object
implements java.io.Serializable
Modifier and Type | Class and Description |
---|---|
static class |
SortOrder.Builder
A builder used to create valid
sort orders . |
Modifier and Type | Method and Description |
---|---|
static SortOrder.Builder |
builderFor(Schema schema)
Creates a new
sort order builder for the given Schema . |
static void |
checkCompatibility(SortOrder sortOrder,
Schema schema) |
boolean |
equals(java.lang.Object other) |
java.util.List<SortField> |
fields()
Returns the list of
sort fields for this sort order |
int |
hashCode() |
boolean |
isSorted()
Returns true if the sort order is sorted
|
boolean |
isUnsorted()
Returns true if the sort order is unsorted
|
int |
orderId()
Returns the ID of this sort order
|
boolean |
sameOrder(SortOrder anotherSortOrder)
Checks whether this order is equivalent to another order while ignoring the order id.
|
boolean |
satisfies(SortOrder anotherSortOrder)
Checks whether this order satisfies another order.
|
Schema |
schema()
Returns the
Schema for this sort order |
java.lang.String |
toString() |
static SortOrder |
unsorted()
Returns a sort order for unsorted tables.
|
public int orderId()
public java.util.List<SortField> fields()
sort fields
for this sort orderpublic boolean isSorted()
public boolean isUnsorted()
public boolean satisfies(SortOrder anotherSortOrder)
anotherSortOrder
- a different sort orderpublic boolean sameOrder(SortOrder anotherSortOrder)
anotherSortOrder
- a different sort orderpublic java.lang.String toString()
toString
in class java.lang.Object
public boolean equals(java.lang.Object other)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public static SortOrder unsorted()
public static SortOrder.Builder builderFor(Schema schema)
sort order builder
for the given Schema
.schema
- a schema