Package fr.igred.omero
Class GenericObjectWrapper.SortById<U extends GenericObjectWrapper<?>>
- java.lang.Object
-
- fr.igred.omero.GenericObjectWrapper.SortById<U>
-
- All Implemented Interfaces:
Comparator<U>
- Enclosing class:
- GenericObjectWrapper<T extends DataObject>
public static class GenericObjectWrapper.SortById<U extends GenericObjectWrapper<?>> extends Object implements Comparator<U>
Class used to sort wrappers.
-
-
Constructor Summary
Constructors Constructor Description SortById()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compare(U object1, U object2)
Compare 2 ObjectWrappers.-
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, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
-
-
-
Method Detail
-
compare
public int compare(U object1, U object2)
Compare 2 ObjectWrappers. Compare the id of the ObjectWrappers.- Specified by:
compare
in interfaceComparator<U extends GenericObjectWrapper<?>>
- Parameters:
object1
- First object to compare.object2
- Second object to compare.- Returns:
- -1 if the id of object1 is lower than the id object2.
- 0 if the ids are the same.
- 1 if the id of object1 is greater than the id of object2.
-
-