Class Bound
- java.lang.Object
-
- com.github.javaparser.symbolsolver.resolution.typeinference.Bound
-
- Direct Known Subclasses:
CapturesBound
,FalseBound
,SameAsBound
,SubtypeOfBound
,ThrowsBound
public abstract class Bound extends Object
Bounds are defined for Inference Variables.- Author:
- Federico Tomassetti
-
-
Constructor Summary
Constructors Constructor Description Bound()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description boolean
isADependency()
Other bounds relate two inference variables, or an inference variable to a type that contains inference variables.Optional<Instantiation>
isAnInstantiation()
Given a bound of the form α = T or T = α, we say T is an instantiation of α.Optional<ProperLowerBound>
isProperLowerBound()
Given a bound of the form T <: α, we say T is a proper lower bound of α.Optional<ProperUpperBound>
isProperUpperBound()
Given a bound of the form α <: T, we say T is a proper upper bound of α.abstract boolean
isSatisfied(InferenceVariableSubstitution inferenceVariableSubstitution)
A bound is satisfied by an inference variable substitution if, after applying the substitution, the assertion is true.abstract Set<InferenceVariable>
usedInferenceVariables()
-
-
-
Method Detail
-
isSatisfied
public abstract boolean isSatisfied(InferenceVariableSubstitution inferenceVariableSubstitution)
A bound is satisfied by an inference variable substitution if, after applying the substitution, the assertion is true.
-
isAnInstantiation
public Optional<Instantiation> isAnInstantiation()
Given 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.
-
isProperUpperBound
public Optional<ProperUpperBound> isProperUpperBound()
Given a bound of the form α <: T, we say T is a proper upper bound of α. Return empty if it is not a proper upper bound. Otherwise it returns the variable of which this is an proper upper bound.
-
isProperLowerBound
public Optional<ProperLowerBound> isProperLowerBound()
Given a bound of the form T <: α, we say T is a proper lower bound of α. Return empty if it is not a proper lower bound. Otherwise it returns the variable of which this is an proper lower bound.
-
isADependency
public boolean isADependency()
Other 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.
-
usedInferenceVariables
public abstract Set<InferenceVariable> usedInferenceVariables()
-
-