public class ComparisonResult extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
ComparisonResult.Type
Result of extractor comparison.
|
| Modifier and Type | Field and Description |
|---|---|
static ComparisonResult |
EQUAL_NM |
static ComparisonResult |
LESS_RESTRICTIVE_NM |
static ComparisonResult |
MORE_RESTRICTIVE_NM |
static ComparisonResult |
NOT_EQUAL_NM |
static ComparisonResult |
OPPOSITE_LESS_RESTRICTIVE_NM |
static ComparisonResult |
OPPOSITE_MORE_RESTRICTIVE_NM |
static ComparisonResult |
OPPOSITE_NM |
static ComparisonResult |
UNEQUAL_NM |
| Constructor and Description |
|---|
ComparisonResult(ComparisonResult.Type type,
int[] indexMap) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
compareIndexMaps(int[] otherIndexMap) |
boolean |
equals(Object obj) |
int[] |
getIndexMap() |
ComparisonResult.Type |
getType() |
int |
hashCode() |
static int[] |
inverse(int[] map,
Set<Integer> parameterIndices)
Inverses index map.
|
boolean |
isOneToOneMapping() |
static boolean |
isOneToOneMapping(int[] map) |
String |
toString() |
public static final ComparisonResult EQUAL_NM
public static final ComparisonResult UNEQUAL_NM
public static final ComparisonResult LESS_RESTRICTIVE_NM
public static final ComparisonResult MORE_RESTRICTIVE_NM
public static final ComparisonResult NOT_EQUAL_NM
public static final ComparisonResult OPPOSITE_NM
public static final ComparisonResult OPPOSITE_LESS_RESTRICTIVE_NM
public static final ComparisonResult OPPOSITE_MORE_RESTRICTIVE_NM
public ComparisonResult(ComparisonResult.Type type, int[] indexMap)
public int[] getIndexMap()
arg[0] < arg[1] and arg[1] > arg[0] are equal with index mapping {1, 0}.
null is returned for no mapping (if extractors are NOT_EQUAL) and for 1 to 1 mapping.
In other words, if cr = e1.compareTo(e2),
then new MappedExtractor(e1, cr.getIndexMap()).compareTo(e2).isOneToOneMapping()==true or
return value of new MappedExtractor(e1, cr.getIndexMap()).extract() is the same as of e2.extract()public ComparisonResult.Type getType()
public boolean isOneToOneMapping()
public static boolean isOneToOneMapping(int[] map)
public boolean compareIndexMaps(int[] otherIndexMap)
public static int[] inverse(int[] map, Set<Integer> parameterIndices)
indexMap2 -