Class SubtypeOfBound
- java.lang.Object
-
- com.github.javaparser.symbolsolver.resolution.typeinference.Bound
-
- com.github.javaparser.symbolsolver.resolution.typeinference.bounds.SubtypeOfBound
-
public class SubtypeOfBound extends Bound
S <: T, where at least one of S or T is an inference variable: S is a subtype of T
-
-
Field Summary
Fields Modifier and Type Field Description private ResolvedType
s
private ResolvedType
t
-
Constructor Summary
Constructors Constructor Description SubtypeOfBound(ResolvedType s, ResolvedType t)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object o)
ResolvedType
getS()
ResolvedType
getT()
int
hashCode()
boolean
isADependency()
Other bounds relate two inference variables, or an inference variable to a type that contains inference variables.java.util.Optional<ProperLowerBound>
isProperLowerBound()
Given a bound of the form T <: α, we say T is a proper lower bound of α.java.util.Optional<ProperUpperBound>
isProperUpperBound()
Given a bound of the form α <: T, we say T is a proper upper bound of α.boolean
isSatisfied(InferenceVariableSubstitution inferenceVariableSubstitution)
A bound is satisfied by an inference variable substitution if, after applying the substitution, the assertion is true.java.lang.String
toString()
java.util.Set<InferenceVariable>
usedInferenceVariables()
-
Methods inherited from class com.github.javaparser.symbolsolver.resolution.typeinference.Bound
isAnInstantiation
-
-
-
-
Field Detail
-
s
private ResolvedType s
-
t
private ResolvedType t
-
-
Constructor Detail
-
SubtypeOfBound
public SubtypeOfBound(ResolvedType s, ResolvedType t)
-
-
Method Detail
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
getS
public ResolvedType getS()
-
usedInferenceVariables
public java.util.Set<InferenceVariable> usedInferenceVariables()
- Specified by:
usedInferenceVariables
in classBound
-
getT
public ResolvedType getT()
-
isProperUpperBound
public java.util.Optional<ProperUpperBound> isProperUpperBound()
Description copied from class:Bound
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.- Overrides:
isProperUpperBound
in classBound
-
isProperLowerBound
public java.util.Optional<ProperLowerBound> isProperLowerBound()
Description copied from class:Bound
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.- Overrides:
isProperLowerBound
in classBound
-
isADependency
public boolean isADependency()
Description copied from class:Bound
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.- Overrides:
isADependency
in classBound
-
isSatisfied
public boolean isSatisfied(InferenceVariableSubstitution inferenceVariableSubstitution)
Description copied from class:Bound
A bound is satisfied by an inference variable substitution if, after applying the substitution, the assertion is true.- Specified by:
isSatisfied
in classBound
-
-