Class 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
    Author:
    Federico Tomassetti
    • Constructor Detail

      • SubtypeOfBound

        public SubtypeOfBound​(com.github.javaparser.resolution.types.ResolvedType s,
                              com.github.javaparser.resolution.types.ResolvedType t)
    • Method Detail

      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • getS

        public com.github.javaparser.resolution.types.ResolvedType getS()
      • getT

        public com.github.javaparser.resolution.types.ResolvedType getT()
      • isProperUpperBound

        public 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 class Bound
      • isProperLowerBound

        public 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 class Bound
      • 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 class Bound
      • 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 class Bound