Class Bound

    • Constructor Detail

      • Bound

        public Bound()
    • 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.