All LDAP Classes
Internal LDAP Classes

org.ietf.ldap
Class LDAPCompareAttrNames

java.lang.Object
  extended by org.ietf.ldap.LDAPCompareAttrNames
All Implemented Interfaces:
java.util.Comparator

public class LDAPCompareAttrNames
extends java.lang.Object
implements java.util.Comparator

An object of this class supports sorting search results by attribute name, in ascending or descending order.

See Also:
com.novell.ldap.CompareAttrNames

Field Summary
private  LDAPCompareAttrNames comp
           
 
Constructor Summary
LDAPCompareAttrNames(java.lang.String attrName)
          Constructs an object that sorts results by a single attribute, in ascending order.
LDAPCompareAttrNames(java.lang.String[] attrNames)
          Constructs an object that sorts by one or more attributes, in the order provided, in ascending order.
LDAPCompareAttrNames(java.lang.String[] attrNames, boolean[] ascendingFlags)
          Constructs an object that sorts by one or more attributes, in the order provided, in either ascending or descending order for each attribute.
LDAPCompareAttrNames(java.lang.String attrName, boolean ascendingFlag)
          Constructs an object that sorts results by a single attribute, in either ascending or descending order.
 
Method Summary
 int compare(java.lang.Object entry1, java.lang.Object entry2)
          Compares the the attributes of the first LDAPEntry to the second.
 boolean equals(java.lang.Object comparator)
          Returns true if this comparator is equal to the specified comparator.
 java.util.Locale getLocale()
          Returns the locale to be used for sorting, if a locale has been specified.
(package private)  LDAPCompareAttrNames getWrappedObject()
          Returns the com.novell.ldap.LDAPCompareAttrNames object
 void setLocale(java.util.Locale locale)
          Sets the locale to be used for sorting.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

comp

private LDAPCompareAttrNames comp
Constructor Detail

LDAPCompareAttrNames

public LDAPCompareAttrNames(java.lang.String attrName)
Constructs an object that sorts results by a single attribute, in ascending order.

See Also:
com.novell.ldap.LDAPCompareAttrNames.LDAPCompareAttrNames(String)

LDAPCompareAttrNames

public LDAPCompareAttrNames(java.lang.String attrName,
                            boolean ascendingFlag)
Constructs an object that sorts results by a single attribute, in either ascending or descending order.

See Also:
com.novell.ldap.LDAPCompareAttrNames.LDAPCompareAttrNames(String, boolean)

LDAPCompareAttrNames

public LDAPCompareAttrNames(java.lang.String[] attrNames)
Constructs an object that sorts by one or more attributes, in the order provided, in ascending order.

See Also:
com.novell.ldap.LDAPCompareAttrNames.LDAPCompareAttrNames(String[])

LDAPCompareAttrNames

public LDAPCompareAttrNames(java.lang.String[] attrNames,
                            boolean[] ascendingFlags)
                     throws LDAPException
Constructs an object that sorts by one or more attributes, in the order provided, in either ascending or descending order for each attribute.

Throws:
LDAPException
See Also:
com.novell.ldap.LDAPCompareAttrNames.LDAPCompareAttrNames(String[], boolean[])
Method Detail

getWrappedObject

LDAPCompareAttrNames getWrappedObject()
Returns the com.novell.ldap.LDAPCompareAttrNames object


getLocale

public java.util.Locale getLocale()
Returns the locale to be used for sorting, if a locale has been specified.

See Also:
com.novell.ldap.LDAPCompareAttrNames.getLocale()

setLocale

public void setLocale(java.util.Locale locale)
Sets the locale to be used for sorting.

See Also:
com.novell.ldap.LDAPCompareAttrNames.setLocale(Locale)

compare

public int compare(java.lang.Object entry1,
                   java.lang.Object entry2)
Compares the the attributes of the first LDAPEntry to the second.

Specified by:
compare in interface java.util.Comparator
See Also:
com.novell.ldap.LDAPCompareAttrNames.Compare(Object, Object)

equals

public boolean equals(java.lang.Object comparator)
Returns true if this comparator is equal to the specified comparator.

Specified by:
equals in interface java.util.Comparator
Overrides:
equals in class java.lang.Object
See Also:
com.novell.ldap.LDAPCompareAttrNames.equals(Object)

All LDAP Classes
Internal LDAP Classes

Copyright ? 2002 Novell, Inc. All Rights Reserved.
Novell, Inc.
1800 South Novell Place
Provo, Ut 84606
Phone: (801) 861-5000