Package org.geotools.feature
Class FeatureComparators.Index
- Object
-
- Index
-
- All Implemented Interfaces:
Comparator
- Enclosing class:
- FeatureComparators
public static class FeatureComparators.Index extends Object implements Comparator
A Comparator which performs the comparison on attributes at a given index.
-
-
Constructor Summary
Constructors Constructor Description Index(int i)
Create a new Comparator based on the given index.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compare(Object o1, Object o2)
Implementation of Comparator.protected int
compareAtts(Object att1, Object att2)
Compares the two attributes.-
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface Comparator
equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
-
-
-
Method Detail
-
compare
public int compare(Object o1, Object o2)
Implementation of Comparator. Calls compareAtts to perform the actual comparison.- Specified by:
compare
in interfaceComparator
- Parameters:
o1
- The first Feature.o2
- The second Feature- Returns:
- A value indicating less than, equal, or greater than.
-
-