Reference:Java.util.Comparator
From Triled Wiki
java.util
public interface java.util.Comparator
| java.util.Comparator |
Contents |
[edit] Known Indirect Subclasses
ApplicationInfo.DisplayNameComparator, Collator, CookieIdentityComparator, CookiePathComparator, PackageItemInfo.DisplayNameComparator, ResolveInfo.DisplayNameComparator, RuleBasedCollator
[edit] Summary
[edit] Public Methods
| int | compare (T object1, T object2) | ||||
| Compare the two objects to determine the relative ordering. | |||||
| boolean | equals (Object object) | ||||
| Compares the argument to the receiver, and answers true if they represent the same object using a class specific comparison. | |||||
[edit] Details
[edit] Public Methods
[edit] public int compare(T object1, T object2)
Compare the two objects to determine the relative ordering.
Parameters
| object1 | an Object to compare |
|---|---|
| object2 | an Object to compare |
Returns
- an int < 0 if object1 is less than object2, 0 if they are equal, and > 0 if object1 is greater
Throws
| ClassCastException | when objects are not the correct type |
|---|
[edit] public boolean equals(Object object)
Compares the argument to the receiver, and answers true if they represent the same object using a class specific comparison.
Parameters
| object | Object the object to compare with this object. |
|---|
Returns
- boolean true if the object is the same as this object false if it is different from this object.
See Also
[edit] References
- Original documentation page for Android SDK build m5-rc15e - 14 apr 2008 17:27
