Package cdc.graphs
Interface PartiallyComparable<T>
-
- Type Parameters:
T- The object type.
public interface PartiallyComparable<T>Interface implemented by objects that are partially comparable.- Author:
- Damien Carbonne
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description static <E extends Comparable<? super E>>
PartialOrderPositionpartialCompare(E left, E right)Convert a total order comparison to a partial order comparison.PartialOrderPositionpartialCompareTo(T o)Return the partial comparison of this object with another one.
-
-
-
Method Detail
-
partialCompareTo
PartialOrderPosition partialCompareTo(T o)
Return the partial comparison of this object with another one.- Parameters:
o- The other object.- Returns:
LESS_THAN,EQUAL,GREATER_THANorUNRELATEDif this object is less than, equal to, greater than, or unrelated too.- Throws:
IllegalArgumentException- Whenoisnull.
-
partialCompare
static <E extends Comparable<? super E>> PartialOrderPosition partialCompare(E left, E right)
Convert a total order comparison to a partial order comparison.- Type Parameters:
E- The Comparable type.- Parameters:
left- The left value.right- The right value.- Returns:
- The conversion of
left.compareTo(right)intoPartialOrderPosition.
-
-