Package com.yahoo.search.query
Class Sorting
- java.lang.Object
-
- com.yahoo.search.query.Sorting
-
- All Implemented Interfaces:
java.lang.Cloneable
public class Sorting extends java.lang.Object implements java.lang.Cloneable
Specifies how a query is sorted by a list of fields with a sort order- Author:
- Arne Bergene Fossaa
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Sorting.AttributeSorter
static class
Sorting.FieldOrder
An attribute (field) and how it should be sortedstatic class
Sorting.LowerCaseSorter
static class
Sorting.Order
static class
Sorting.RawSorter
static class
Sorting.UcaSorter
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
LOWERCASE
static java.lang.String
RAW
static java.lang.String
STRENGTH_IDENTICAL
static java.lang.String
STRENGTH_PRIMARY
static java.lang.String
STRENGTH_QUATERNARY
static java.lang.String
STRENGTH_SECONDARY
static java.lang.String
STRENGTH_TERTIARY
static java.lang.String
UCA
-
Constructor Summary
Constructors Constructor Description Sorting()
Creates an empty sort specSorting(java.lang.String sortSpec)
Creates a sort spec from a stringSorting(java.util.List<Sorting.FieldOrder> fieldOrders)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Sorting
clone()
int
encode(java.nio.ByteBuffer buffer)
boolean
equals(java.lang.Object o)
java.util.List<Sorting.FieldOrder>
fieldOrders()
Returns the field orders of this sort specification as list.static Sorting
fromString(java.lang.String sortSpec)
Creates a new sorting from the given string and returns it, or returns null if the argument does not contain any sorting criteria (e.g it is null or the empty string)int
hashCode()
java.lang.String
toString()
-
-
-
Field Detail
-
STRENGTH_IDENTICAL
public static final java.lang.String STRENGTH_IDENTICAL
- See Also:
- Constant Field Values
-
STRENGTH_QUATERNARY
public static final java.lang.String STRENGTH_QUATERNARY
- See Also:
- Constant Field Values
-
STRENGTH_TERTIARY
public static final java.lang.String STRENGTH_TERTIARY
- See Also:
- Constant Field Values
-
STRENGTH_SECONDARY
public static final java.lang.String STRENGTH_SECONDARY
- See Also:
- Constant Field Values
-
STRENGTH_PRIMARY
public static final java.lang.String STRENGTH_PRIMARY
- See Also:
- Constant Field Values
-
UCA
public static final java.lang.String UCA
- See Also:
- Constant Field Values
-
RAW
public static final java.lang.String RAW
- See Also:
- Constant Field Values
-
LOWERCASE
public static final java.lang.String LOWERCASE
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
Sorting
public Sorting()
Creates an empty sort spec
-
Sorting
public Sorting(java.util.List<Sorting.FieldOrder> fieldOrders)
-
Sorting
public Sorting(java.lang.String sortSpec)
Creates a sort spec from a string
-
-
Method Detail
-
fromString
public static Sorting fromString(java.lang.String sortSpec)
Creates a new sorting from the given string and returns it, or returns null if the argument does not contain any sorting criteria (e.g it is null or the empty string)
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
fieldOrders
public java.util.List<Sorting.FieldOrder> fieldOrders()
Returns the field orders of this sort specification as list. This is never null but can be empty. This list can be modified to change this sort spec.
-
clone
public Sorting clone()
- Overrides:
clone
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
encode
public int encode(java.nio.ByteBuffer buffer)
-
-