java.lang.Comparable<FallbackCondition>
, FallbackCondition
public class PairwiseTypedFallbackCondition extends TypedFallbackCondition implements FallbackCondition, java.lang.Comparable<FallbackCondition>
TypedFallbackCondition
that filters on a particular pair of types.
If the pair of Convex
types match this pair, then the condition is met.
Note: this class has a natural ordering that is inconsistent with equals.
Constructor | Description |
---|---|
PairwiseTypedFallbackCondition(java.lang.Class<? extends Convex> type1,
boolean strict1,
java.lang.Class<? extends Convex> type2,
boolean strict2) |
Optional constructor.
|
PairwiseTypedFallbackCondition(java.lang.Class<? extends Convex> type1,
boolean strict1,
java.lang.Class<? extends Convex> type2,
boolean strict2,
int sortIndex) |
Full constructor.
|
PairwiseTypedFallbackCondition(java.lang.Class<? extends Convex> type1,
java.lang.Class<? extends Convex> type2) |
Minimal constructor.
|
PairwiseTypedFallbackCondition(java.lang.Class<? extends Convex> type1,
java.lang.Class<? extends Convex> type2,
boolean strict) |
Optional constructor.
|
PairwiseTypedFallbackCondition(java.lang.Class<? extends Convex> type1,
java.lang.Class<? extends Convex> type2,
boolean strict,
int sortIndex) |
Optional constructor.
|
PairwiseTypedFallbackCondition(java.lang.Class<? extends Convex> type1,
java.lang.Class<? extends Convex> type2,
int sortIndex) |
Optional constructor.
|
Modifier and Type | Method | Description |
---|---|---|
boolean |
equals(java.lang.Object obj) |
|
java.lang.Class<? extends Convex> |
getType1() |
Returns the first type for this fallback condition.
|
java.lang.Class<? extends Convex> |
getType2() |
Returns the second type for this fallback condition.
|
int |
hashCode() |
|
boolean |
isMatch(java.lang.Class<? extends Convex> type1,
java.lang.Class<? extends Convex> type2) |
Returns true if the given types match this condition.
|
boolean |
isStrict1() |
Returns true if this condition uses a strict type comparison for the first type.
|
boolean |
isStrict2() |
Returns true if this condition uses a strict type comparison for the second type.
|
java.lang.String |
toString() |
compareTo, getSortIndex
getSortIndex, isMatch
isMatch
public PairwiseTypedFallbackCondition(java.lang.Class<? extends Convex> type1, java.lang.Class<? extends Convex> type2)
The ordering of the types doesn't matter.
The type matching defaults to strict for both types.
type1
- the first type of the pairtype2
- the second type of the pairpublic PairwiseTypedFallbackCondition(java.lang.Class<? extends Convex> type1, java.lang.Class<? extends Convex> type2, int sortIndex)
The ordering of the types doesn't matter.
The type matching defaults to strict for both types.
type1
- the first type of the pairtype2
- the second type of the pairsortIndex
- the sort index of this conditionpublic PairwiseTypedFallbackCondition(java.lang.Class<? extends Convex> type1, java.lang.Class<? extends Convex> type2, boolean strict)
The ordering of the types doesn't matter.
type1
- the first type of the pairtype2
- the second type of the pairstrict
- true if a strict type comparison should be performed for both typespublic PairwiseTypedFallbackCondition(java.lang.Class<? extends Convex> type1, java.lang.Class<? extends Convex> type2, boolean strict, int sortIndex)
The ordering of the types doesn't matter.
type1
- the first type of the pairtype2
- the second type of the pairstrict
- true if a strict type comparison should be performed on both typessortIndex
- the sort index of this conditionpublic PairwiseTypedFallbackCondition(java.lang.Class<? extends Convex> type1, boolean strict1, java.lang.Class<? extends Convex> type2, boolean strict2)
The ordering of the types doesn't matter.
type1
- the first type of the pairstrict1
- true if a strict type comparison should be performed on the first typetype2
- the second type of the pairstrict2
- true if a strict type comparison should be performed on the second typepublic PairwiseTypedFallbackCondition(java.lang.Class<? extends Convex> type1, boolean strict1, java.lang.Class<? extends Convex> type2, boolean strict2, int sortIndex)
The ordering of the types doesn't matter.
type1
- the first type of the pairstrict1
- true if a strict type comparison should be performed on the first typetype2
- the second type of the pairstrict2
- true if a strict type comparison should be performed on the second typesortIndex
- the sort index of this conditionpublic int hashCode()
hashCode
in class AbstractFallbackCondition
public boolean equals(java.lang.Object obj)
equals
in class AbstractFallbackCondition
public java.lang.String toString()
toString
in class java.lang.Object
public boolean isMatch(java.lang.Class<? extends Convex> type1, java.lang.Class<? extends Convex> type2)
TypedFallbackCondition
isMatch
in class TypedFallbackCondition
type1
- the type of the first Convex
type2
- the type of the second Convex
public java.lang.Class<? extends Convex> getType1()
Convex
>public java.lang.Class<? extends Convex> getType2()
Convex
>public boolean isStrict1()
public boolean isStrict2()