javax.lang
インタフェース PartialOrder

すべてのスーパーインタフェース:
java.lang.Comparable
既知の実装クラスの一覧:
Pointer, Value

public interface PartialOrder
extends java.lang.Comparable

The interface representing partial order.
Partially ordered set is a set in which some (i.e., not necessarily all pairs of) two values are comparable.

作成者:
Toshihiro YOSHINO

入れ子クラスの概要
static class PartialOrder.IncomparableException
          An exception object thrown when the comparison is impossible.
 
メソッドの概要
 boolean comparable(java.lang.Object that)
          Returns whether this object and the specified object are comparable or not.
 int compareTo(java.lang.Object that)
          Compares two objects.
 

メソッドの詳細

comparable

public boolean comparable(java.lang.Object that)
                   throws java.lang.ClassCastException
Returns whether this object and the specified object are comparable or not. The following rules must be assured for this method.

パラメータ:
that - Target object
戻り値:
true if this and that are comparable. false otherwise.
例外:
java.lang.ClassCastException - that is not an instance which this requires.

compareTo

public int compareTo(java.lang.Object that)
              throws java.lang.ClassCastException,
                     PartialOrder.IncomparableException
Compares two objects.
Caller must not call this method unless comparable returns true. Otherwise IncomparableException is thrown.
The result of comparison complies the rules described in the documentation of java.lang.Comparable interface.

定義:
インタフェース java.lang.Comparable 内の compareTo
パラメータ:
that - Target object
戻り値:
The result of comparison
例外:
java.lang.ClassCastException - when that is not an instance which this requires.
PartialOrder.IncomparableException - when this and that are not comparable.
関連項目:
comparable(Object), Comparable