com.miginfocom.util
Class FirstOrLastComparator
java.lang.Object
com.miginfocom.util.FirstOrLastComparator
- All Implemented Interfaces:
- java.io.Serializable, java.util.Comparator
public final class FirstOrLastComparator
- extends java.lang.Object
- implements java.util.Comparator, java.io.Serializable
A comparator that moves one object to the head or tail of the list. All other object will be in the same place.
- See Also:
- Serialized Form
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface java.util.Comparator |
equals |
FirstOrLastComparator
public FirstOrLastComparator(java.lang.Object o,
boolean toHead)
- Constructor.
- Parameters:
o - The object to move to first or last postition (head or tail).toHead - If true o will be moved to
compare
public final int compare(java.lang.Object o1,
java.lang.Object o2)
- Specified by:
compare in interface java.util.Comparator
getObject
public java.lang.Object getObject()
isToHead
public boolean isToHead()
getToHead
public boolean getToHead()
Copyright © 2005 MiG InfoCom AB. All Rights Reserved.