Interface PartiallyComparable<T>
-
- Type Parameters:
T
- type that this can be compared to.
- All Known Subinterfaces:
DetachedPropertiesDescription
,DetachedRelationshipDescription
,Predicate
,PropertiesDescription
,RelationshipDescription
- All Known Implementing Classes:
BaseDetachedPropertiesDescription
,BasePropertiesDescription
,BaseRelationshipDescription
,DetachedRelationshipDescriptionImpl
,LazyPropertiesDescription
,LazyRelationshipDescription
,LiteralPropertiesDescription
,WildcardPropertiesDescription
public interface PartiallyComparable<T>
Interface for types that can compare themselves to other types using a general to specific ordering. Since general-to-specific ordering is a partial (as opposed to total) ordering, note thatisMoreGeneralThan(T)
andisMoreSpecificThan(T)
can both returnfalse
for the same objects. Likewise, if the objects are of equal generality, both methods can returntrue
.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
isMoreGeneralThan(T other)
Is this instance more general than (or at least as general as) the given instance?boolean
isMoreSpecificThan(T other)
Is this instance more specific than (or at least as specific as) the given instance?
-
-
-
Method Detail
-
isMoreGeneralThan
boolean isMoreGeneralThan(T other)
Is this instance more general than (or at least as general as) the given instance?- Parameters:
other
- to compare.- Returns:
- true iff this instance is more general than or as general as the provided instance.
-
isMoreSpecificThan
boolean isMoreSpecificThan(T other)
Is this instance more specific than (or at least as specific as) the given instance?- Parameters:
other
- to compare.- Returns:
- true iff this instance is more specific than or as specific as the provided instance.
-
-