Package org.geotools.feature
Class FeatureComparators
Object
FeatureComparators
A utility class for creating simple Comparators for Features.
- Author:
- Ian Schneider
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionstatic classA Comparator which performs the comparison on attributes at a given index.static classA Comparator which performs the comparison on attributes with a given name.
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final ComparatorA utility comparator for comparison by id.
- 
Method SummaryModifier and TypeMethodDescriptionstatic ComparatorbyAttributeIndex(int idx) Create a Comparator which compares Features by the attribute at the given index.static ComparatorbyAttributeName(String name) Create a Comparator which compares Features by the attribute found at the given path.
- 
Field Details- 
BY_IDA utility comparator for comparison by id.
 
- 
- 
Method Details- 
byAttributeIndexCreate a Comparator which compares Features by the attribute at the given index. The attribute at the index MUST be Comparable. This will probably not work for heterogenous collections, UNLESS the classes at the given index are the same.- Parameters:
- idx- The index to look up attributes at.
- Returns:
- A new Comparator.
 
- 
byAttributeNameCreate a Comparator which compares Features by the attribute found at the given path. The attribute found MUST be Comparable. This will probably not work for heterogenous collections, UNLESS the attributes found are the same class.- Parameters:
- name- The xpath to use while comparing.
- Returns:
- A new Comparator.
 
 
-