|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.opends.server.types.SortKey
@PublicAPI(stability=VOLATILE, mayInstantiate=true, mayExtend=false, mayInvoke=true) public final class SortKey
This class defines a data structure that may be used as a sort key. It includes an attribute type and a boolean value that indicates whether the sort should be ascending or descending. It may also contain a specific ordering matching rule that should be used for the sorting process, although if none is provided it will use the default ordering matching rule for the attribute type.
Constructor Summary | |
---|---|
SortKey(AttributeType attributeType,
boolean ascending)
Creates a new sort key with the provided information. |
|
SortKey(AttributeType attributeType,
boolean ascending,
OrderingMatchingRule orderingRule)
Creates a new sort key with the provided information. |
Method Summary | |
---|---|
boolean |
ascending()
Indicates whether the specified attribute should be sorted in ascending order. |
int |
compareValues(AttributeValue value1,
AttributeValue value2)
Compares the provided values using this sort key. |
boolean |
equals(java.lang.Object o)
Indicates whether this sort key is equal to the provided object. |
AttributeType |
getAttributeType()
Retrieves the attribute type for this sort key. |
OrderingMatchingRule |
getOrderingRule()
Retrieves the ordering matching rule to use with this sort key. |
int |
hashCode()
Retrieves the hash code for this sort key. |
java.lang.String |
toString()
Retrieves a string representation of this sort key. |
void |
toString(java.lang.StringBuilder buffer)
Appends a string representation of this sort key to the provided buffer. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public SortKey(AttributeType attributeType, boolean ascending)
attributeType
- The attribute type for this sort key.ascending
- Indicates whether the sort should be in
ascending order rather than descending.public SortKey(AttributeType attributeType, boolean ascending, OrderingMatchingRule orderingRule)
attributeType
- The attribute type for this sort key.ascending
- Indicates whether the sort should be in
ascending order rather than descending.orderingRule
- The ordering matching rule to use with
this sort key.Method Detail |
---|
public AttributeType getAttributeType()
public boolean ascending()
true
if the attribute should be sorted in
ascending order, or false
if it should be sorted
in descending order.public OrderingMatchingRule getOrderingRule()
public int compareValues(AttributeValue value1, AttributeValue value2)
value1
- The first value to be compared.value2
- The second value to be compared.
public java.lang.String toString()
toString
in class java.lang.Object
public void toString(java.lang.StringBuilder buffer)
buffer
- The buffer to which the information should be
appended.public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
o
- The object for which to make the determination.
true
if the provide object is equal to this
sort key, or false
if it is not.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |