Class TypeEqualityBound
java.lang.Object
de.monticore.types3.generics.bounds.Bound
de.monticore.types3.generics.bounds.TypeEqualityBound
- All Implemented Interfaces:
Comparable<Bound>
States that an inference variable equals another type.
If the other type does not contain inference variables,
this describes an "instantiation".
The order of types is predefined,
e.g., for getFirstType();
First is always a type variable,
if both are type variables, the order is based on the id.
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedTypeEqualityBound(SymTypeExpression typeA, SymTypeExpression typeB) -
Method Summary
Modifier and TypeMethodDescriptionbooleandeepEquals(Bound other) If the second type is a typeVariable as well, returns the Bound with its types order exchanged.Helper function;booleanprint()returns a human-readable String, e.g., for the logMethods inherited from class de.monticore.types3.generics.bounds.Bound
asCaptureBound, asSubTypingBound, asTypeCompatibilityBound, asUnsatisfiableBound, compareTo, isCaptureBound, isSubTypingBound, isTypeCompatibilityBound, isUnsatisfiableBound
-
Field Details
-
firstType
-
secondType
-
-
Constructor Details
-
TypeEqualityBound
-
TypeEqualityBound
protected TypeEqualityBound()
-
-
Method Details
-
getFirstType
-
getSecondType
-
getFlipped
If the second type is a typeVariable as well, returns the Bound with its types order exchanged. -
isTypeEqualityBound
public boolean isTypeEqualityBound()- Overrides:
isTypeEqualityBoundin classBound
-
asTypeEqualityBound
- Overrides:
asTypeEqualityBoundin classBound
-
deepEquals
- Specified by:
deepEqualsin classBound
-
print
Description copied from class:Boundreturns a human-readable String, e.g., for the log -
getIncludedTypes
Description copied from class:BoundHelper function;- Specified by:
getIncludedTypesin classBound- Returns:
- the types included in the bounds (most have two).
-