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

      Constructors 
      Constructor Description
      SameAsBound​(com.github.javaparser.resolution.types.ResolvedType s, com.github.javaparser.resolution.types.ResolvedType t)  
    • Constructor Detail

      • SameAsBound

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

      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • hashCode

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

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

        public com.github.javaparser.resolution.types.ResolvedType getT()
      • 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
      • isAnInstantiation

        public java.util.Optional<Instantiation> isAnInstantiation()
        Description copied from class: Bound
        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.
        Overrides:
        isAnInstantiation 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