public class ContainmentHierarchy<Q> extends Object implements QualifierHierarchy<Wildcard<Q>>
Wildcard
s, ordered by the containment relation (JLS
4.5.1).Constructor and Description |
---|
ContainmentHierarchy(QualifierHierarchy<PolyQual<Q>> polyQualHierarchy) |
Modifier and Type | Method and Description |
---|---|
Wildcard<Q> |
getBottom()
Gets the bottom annotation of the hierarchy.
|
Wildcard<Q> |
getTop()
Gets the top annotation of the hierarchy.
|
Wildcard<Q> |
greatestLowerBound(Wildcard<Q> a,
Wildcard<Q> b)
Gets the greatest lower bound of two qualifiers.
|
boolean |
isSubtype(Wildcard<Q> subtype,
Wildcard<Q> supertype)
Checks if
subtype is a subtype of supertype . |
Wildcard<Q> |
leastUpperBound(Wildcard<Q> a,
Wildcard<Q> b)
Gets the least upper bound of two qualifiers.
|
public ContainmentHierarchy(QualifierHierarchy<PolyQual<Q>> polyQualHierarchy)
polyQualHierarchy
- the hierarchy to use for comparing wildcard boundspublic boolean isSubtype(Wildcard<Q> subtype, Wildcard<Q> supertype)
QualifierHierarchy
subtype
is a subtype of supertype
.isSubtype
in interface QualifierHierarchy<Wildcard<Q>>
public Wildcard<Q> leastUpperBound(Wildcard<Q> a, Wildcard<Q> b)
QualifierHierarchy
leastUpperBound
in interface QualifierHierarchy<Wildcard<Q>>
public Wildcard<Q> greatestLowerBound(Wildcard<Q> a, Wildcard<Q> b)
QualifierHierarchy
greatestLowerBound
in interface QualifierHierarchy<Wildcard<Q>>
public Wildcard<Q> getTop()
QualifierHierarchy
getTop
in interface QualifierHierarchy<Wildcard<Q>>
public Wildcard<Q> getBottom()
QualifierHierarchy
getBottom
in interface QualifierHierarchy<Wildcard<Q>>