@PublicAPI(stability=VOLATILE, mayInstantiate=true, mayExtend=false, mayInvoke=true) public final class SortKey extends Object
FIXME: replace with the equivalent SDK type.
Constructor and Description |
---|
SortKey(AttributeType attributeType,
boolean ascending)
Creates a new sort key with the provided information.
|
SortKey(AttributeType attributeType,
boolean ascending,
org.forgerock.opendj.ldap.schema.MatchingRule orderingRule)
Creates a new sort key with the provided information.
|
Modifier and Type | Method and Description |
---|---|
boolean |
ascending()
Indicates whether the specified attribute should be sorted in
ascending order.
|
int |
compareValues(org.forgerock.opendj.ldap.ByteString value1,
org.forgerock.opendj.ldap.ByteString value2)
Compares the provided values using this sort key.
|
boolean |
equals(Object o)
Indicates whether this sort key is equal to the provided
object.
|
AttributeType |
getAttributeType()
Retrieves the attribute type for this sort key.
|
org.forgerock.opendj.ldap.schema.MatchingRule |
getOrderingRule()
Retrieves the ordering matching rule to use with this sort key.
|
int |
hashCode()
Retrieves the hash code for this sort key.
|
String |
toString()
Retrieves a string representation of this sort key.
|
void |
toString(StringBuilder buffer)
Appends a string representation of this sort key to the
provided buffer.
|
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, org.forgerock.opendj.ldap.schema.MatchingRule 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.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 org.forgerock.opendj.ldap.schema.MatchingRule getOrderingRule()
public int compareValues(org.forgerock.opendj.ldap.ByteString value1, org.forgerock.opendj.ldap.ByteString value2)
value1
- The first value to be compared.value2
- The second value to be compared.public void toString(StringBuilder buffer)
buffer
- The buffer to which the information should be
appended.public int hashCode()
Copyright © 2010-2015 ForgeRock AS. All Rights Reserved.