Package loci.poi.poifs.property
Class DirectoryProperty.PropertyComparator
- java.lang.Object
-
- loci.poi.poifs.property.DirectoryProperty.PropertyComparator
-
- All Implemented Interfaces:
Comparator
- Enclosing class:
- DirectoryProperty
public static class DirectoryProperty.PropertyComparator extends Object implements Comparator
-
-
Constructor Summary
Constructors Constructor Description PropertyComparator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compare(Object o1, Object o2)
compare method.boolean
equals(Object o)
Object equality, implemented as object identity-
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.util.Comparator
reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
-
-
-
Method Detail
-
equals
public boolean equals(Object o)
Object equality, implemented as object identity- Specified by:
equals
in interfaceComparator
- Overrides:
equals
in classObject
- Parameters:
o
- Object we're being compared to- Returns:
- true if identical, else false
-
compare
public int compare(Object o1, Object o2)
compare method. Assumes both parameters are non-null instances of Property. One property is less than another if its name is shorter than the other property's name. If the names are the same length, the property whose name comes before the other property's name, alphabetically, is less than the other property.- Specified by:
compare
in interfaceComparator
- Parameters:
o1
- first object to compare, better be a Propertyo2
- second object to compare, better be a Property- Returns:
- negative value if o1 < o2, zero if o1 == o2, positive value if o1 > o2.
-
-