public class SortValues extends Object implements Comparable<SortValues>
null
if the entry does not include any values
for the attribute type targeted by the corresponding sort key.
Comparable
interface and may therefore be
used to order the elements in components like TreeMap
and
TreeSet
.
FIXME: replace with the SDK's SortKey?
Constructor and Description |
---|
SortValues(EntryID entryID,
org.forgerock.opendj.ldap.ByteString[] values,
SortOrder sortOrder)
Creates a new sort values object with the provided information.
|
SortValues(EntryID entryID,
Entry entry,
SortOrder sortOrder)
Creates a new sort values object with the provided information.
|
Modifier and Type | Method and Description |
---|---|
int |
compareTo(org.forgerock.opendj.ldap.ByteString assertionValue)
Compares the first element in this set of sort values with the provided
assertion value to determine whether the assertion value is greater than or
equal to the initial sort value.
|
int |
compareTo(SortValues sortValues)
Compares this set of sort values with the provided set of values to
determine their relative order in a sorted list.
|
long |
getEntryID()
Retrieve the entry ID in this sort values.
|
AttributeType[] |
getTypes()
Retrieve the type of the attribute values in this sort values.
|
org.forgerock.opendj.ldap.ByteString[] |
getValues()
Retrieve the attribute values in this sort values.
|
String |
toString()
Retrieves a string representation of this sort values object.
|
void |
toString(StringBuilder buffer)
Appends a string representation of this sort values object to the provided
buffer.
|
public SortValues(EntryID entryID, org.forgerock.opendj.ldap.ByteString[] values, SortOrder sortOrder)
entryID
- The entry ID for the entry associated with this set of
values.values
- The attribute values for this sort values.sortOrder
- The sort order to use to obtain the necessary values.public SortValues(EntryID entryID, Entry entry, SortOrder sortOrder)
entryID
- The entry ID for the entry associated with this set of
values.entry
- The entry containing the values to extract and use when
sorting.sortOrder
- The sort order to use to obtain the necessary values.public int compareTo(SortValues sortValues)
compareTo
in interface Comparable<SortValues>
sortValues
- The set of values to compare against this sort values.
It must also have the same sort order as this set of
values.public int compareTo(org.forgerock.opendj.ldap.ByteString assertionValue)
assertionValue
- The assertion value to compare against the first
sort value.public void toString(StringBuilder buffer)
buffer
- The buffer to which the information should be appended.public org.forgerock.opendj.ldap.ByteString[] getValues()
public AttributeType[] getTypes()
public long getEntryID()
Copyright © 2010-2015 ForgeRock AS. All Rights Reserved.