Interface FeatureAwareComparator<T>
-
- Type Parameters:
T
- The type of the objects comparable with this comparator
- All Known Implementing Classes:
LocalizedEnumeratorComparator
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface public interface FeatureAwareComparator<T>
Defines a comparator which knows about the feature that the compared values are stored in. This allows to use knowledge of the feature for the comparison.- Since:
- 1.22
- Author:
- Lucas Koehler
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description int
compare(org.eclipse.emf.ecore.EStructuralFeature feature, T leftValue, T rightValue)
Compares two values of the given feature.
-
-
-
Method Detail
-
compare
int compare(org.eclipse.emf.ecore.EStructuralFeature feature, T leftValue, T rightValue)
Compares two values of the given feature.- Parameters:
feature
- TheEStructuralFeature
containing the valuesleftValue
- Left valuerightValue
- Right Value- Returns:
- a negative number if the left value is less than the right value;
the value
0
if the left value is equal to the right value; a positive number if the left value is greater than the right value. Thereby,null
input values are treated as bigger than any other non-null value - See Also:
Comparator.compare(Object, Object)
-
-