|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.unboundid.ldap.sdk.unboundidds.examples.FilterComparator
@NotMutable @ThreadSafety(level=COMPLETELY_THREADSAFE) public final class FilterComparator
NOTE: This class is part of the Commercial Edition of the UnboundID LDAP SDK for Java. It is not available for use in applications that include only the Standard Edition of the LDAP SDK, and is not supported for use in conjunction with non-UnboundID products.This class provides a comparator that may be used to define a relative order for search filters. The filter order will be based first on the filter type (in the following order: AND, OR, NOT, equality, substring, greater-or-equal, less-or-equal, presence, approximate match, extensible match), then based on the attribute name, and then by the assertion value. For AND and OR filters, with all other things equal, a filter with fewer components will be ordered before one with more components. For a substring filter with all other things equal, then a filter missing a substring element will be ordered before one with that element, and one with fewer subAny elements will be ordered before one with more subAny elements. For an extensible match filter with all other things being equal, a filter without an element will be ordered before one with that element.
Method Summary | |
---|---|
int |
compare(Filter f1,
Filter f2)
Determines a relative order for the provided filter objects. |
boolean |
equals(java.lang.Object o)
Indicates whether the provided object is equal to this filter comparator. |
static FilterComparator |
getInstance()
Retrieves the singleton instance of this filter comparator. |
int |
hashCode()
Retrieves a hash code for this filter comparator. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static FilterComparator getInstance()
public int compare(Filter f1, Filter f2)
compare
in interface java.util.Comparator<Filter>
f1
- The first filter for which to make the determination.f2
- The second filter for which to make the determination.
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object o)
equals
in interface java.util.Comparator<Filter>
equals
in class java.lang.Object
o
- The object for which to make the determination.
true
if the provided object is equal to this filter
comparator, or false
if not.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |