Class SameAsBound
- java.lang.Object
-
- com.github.javaparser.symbolsolver.resolution.typeinference.Bound
-
- com.github.javaparser.symbolsolver.resolution.typeinference.bounds.SameAsBound
-
public class SameAsBound extends Bound
S = T, where at least one of S or T is an inference variable: S is the same as T.
-
-
Field Summary
Fields Modifier and Type Field Description private ResolvedTypesprivate ResolvedTypet
-
Constructor Summary
Constructors Constructor Description SameAsBound(ResolvedType s, ResolvedType t)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object o)ResolvedTypegetS()ResolvedTypegetT()inthashCode()booleanisADependency()Other bounds relate two inference variables, or an inference variable to a type that contains inference variables.java.util.Optional<Instantiation>isAnInstantiation()Given a bound of the form α = T or T = α, we say T is an instantiation of α.booleanisSatisfied(InferenceVariableSubstitution inferenceVariableSubstitution)A bound is satisfied by an inference variable substitution if, after applying the substitution, the assertion is true.java.lang.StringtoString()java.util.Set<InferenceVariable>usedInferenceVariables()-
Methods inherited from class com.github.javaparser.symbolsolver.resolution.typeinference.Bound
isProperLowerBound, isProperUpperBound
-
-
-
-
Field Detail
-
s
private ResolvedType s
-
t
private ResolvedType t
-
-
Constructor Detail
-
SameAsBound
public SameAsBound(ResolvedType s, ResolvedType t)
-
-
Method Detail
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
usedInferenceVariables
public java.util.Set<InferenceVariable> usedInferenceVariables()
- Specified by:
usedInferenceVariablesin classBound
-
getS
public ResolvedType getS()
-
getT
public ResolvedType getT()
-
isADependency
public boolean isADependency()
Description copied from class:BoundOther bounds relate two inference variables, or an inference variable to a type that contains inference variables. Such bounds, of the form S = T or S <: T, are called dependencies.- Overrides:
isADependencyin classBound
-
isAnInstantiation
public java.util.Optional<Instantiation> isAnInstantiation()
Description copied from class:BoundGiven a bound of the form α = T or T = α, we say T is an instantiation of α. Return empty if it is not an instantiation. Otherwise it returns the variable of which this is an instantiation.- Overrides:
isAnInstantiationin classBound
-
isSatisfied
public boolean isSatisfied(InferenceVariableSubstitution inferenceVariableSubstitution)
Description copied from class:BoundA bound is satisfied by an inference variable substitution if, after applying the substitution, the assertion is true.- Specified by:
isSatisfiedin classBound
-
-