|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--net.rim.device.api.ldap.LDAPComparator
Contains the functionality required for comparing LDAP objects.
This object is used for sorting LDAPEntry objects according to one or many of their attributes.
| Constructor Summary | ||
|
LDAPComparator(String[] sortAttributes)
Creates an LDAPComparator object given the list of sort attributes to use.
|
|
| Method Summary | ||
|
int |
compare(Object o1,
Object o2)
Compares two LDAPEntry objects.
|
|
boolean |
equals(Object o1)
Returns a boolean denoting whether the object passed into this method is equal to the current object. |
|
String[] |
getSortFields()
Returns the attributes used to compare objects. |
| Methods inherited from class java.lang.Object |
getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public LDAPComparator(String[] sortAttributes)
LDAPComparator object given the list of sort attributes to use.
For example, to sort according to givenname followed by sn, use the following code: LDAPComparator cmp = new LDAPComparator(new String[] {"givenname","sn"});
If passed an empty array of strings, all objects will be reported as equal.
sortFields - An array of Strings representing the sorting attributes. Must be non-null.| Method Detail |
public String[] getSortFields()
public int compare(Object o1, Object o2)
LDAPEntry objects.
compare in interface Comparatoro1 - First object to compareo2 - First object to compareClassCastException - - If either of the two objects are not LDAPEntry objectspublic boolean equals(Object o1)
equals in interface Comparatorequals in class Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Copyright 1999-2004 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Copyright 1993-2003 Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, California, 94303, U.S.A.
Copyright 2002-2003 Nokia Corporation All Rights Reserved.
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.