l3cover.adl
クラス Value

java.lang.Object
  拡張javax.lang.Variant
      拡張l3cover.adl.Value
すべての実装インタフェース:
java.lang.Comparable, PartialOrder

public class Value
extends Variant
implements PartialOrder

ADL computational values

作成者:
Toshihiro YOSHINO

入れ子クラスの概要
 
クラス javax.lang.Variant から継承した入れ子クラス
Variant.InvalidTypeException
 
クラス javax.lang.PartialOrder から継承した入れ子クラス
PartialOrder.IncomparableException
 
フィールドの概要
static Value JUNK
          Singleton instance of meaningless value
static int TYPE_INT
          Tag for integer values
static int TYPE_JUNK
          Tag for meaningless values
protected static int TYPE_MAXVALUE
          Max value of the tags
static int TYPE_POINTER
          Tag for pointer values
 
コンストラクタの概要
protected Value(int type)
          Delegating constructor.
 
メソッドの概要
 boolean comparable(java.lang.Object o)
          Returns whether this object and the specified object are comparable or not.
 int compareTo(java.lang.Object o)
          Compares two objects.
 Int getIntValue()
          Obtain the integer value represented by this object.
 Pointer getPointerValue()
          Obtain the pointer value represented by this object.
static Value Int(Int intValue)
          Constructs a Value object representing an integer value.
static Value Junk()
          Constructs a Value object representing a meaningless value.
static Value Pointer(Pointer pointerValue)
          Constructs a Value object representing a pointer value.
 java.lang.String toString()
          Returns the string representation of this object.
protected  java.lang.String toStringInternal()
          Returns the string representation of this object.
 
クラス javax.lang.Variant から継承したメソッド
assertType, getType, unsupportedException, unsupportedException
 
クラス java.lang.Object から継承したメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

フィールドの詳細

TYPE_JUNK

public static final int TYPE_JUNK
Tag for meaningless values

関連項目:
定数フィールド値

TYPE_INT

public static final int TYPE_INT
Tag for integer values

関連項目:
定数フィールド値

TYPE_POINTER

public static final int TYPE_POINTER
Tag for pointer values

関連項目:
定数フィールド値

TYPE_MAXVALUE

protected static final int TYPE_MAXVALUE
Max value of the tags

関連項目:
定数フィールド値

JUNK

public static final Value JUNK
Singleton instance of meaningless value

コンストラクタの詳細

Value

protected Value(int type)
Delegating constructor.

パラメータ:
type - type of the value
メソッドの詳細

Junk

public static Value Junk()
Constructs a Value object representing a meaningless value.

戻り値:
Junk Value

Int

public static Value Int(Int intValue)
Constructs a Value object representing an integer value.

パラメータ:
intValue -
戻り値:
Integer Value

Pointer

public static Value Pointer(Pointer pointerValue)
Constructs a Value object representing a pointer value.

パラメータ:
pointerValue - pointer value
戻り値:
Pointer Value

getIntValue

public Int getIntValue()
Obtain the integer value represented by this object.

戻り値:
integer value
例外:
InvalidTypeException - when type != TYPE_INT

getPointerValue

public Pointer getPointerValue()
Obtain the pointer value represented by this object.

戻り値:
pointer value
例外:
InvalidTypeException - when type != TYPE_POINTER

comparable

public boolean comparable(java.lang.Object o)
インタフェース PartialOrder の記述:
Returns whether this object and the specified object are comparable or not. The following rules must be assured for this method.

定義:
インタフェース PartialOrder 内の comparable
パラメータ:
o - Target object
戻り値:
true if this and that are comparable. false otherwise.

compareTo

public int compareTo(java.lang.Object o)
              throws PartialOrder.IncomparableException
インタフェース PartialOrder の記述:
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.

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

toStringInternal

protected java.lang.String toStringInternal()
Returns the string representation of this object. Override in the subclass if needed.

戻り値:
string representation

toString

public java.lang.String toString()
Returns the string representation of this object.

オーバーライド:
クラス Variant 内の toString
戻り値:
string representation