|
||||||||||
前のクラス 次のクラス | フレームあり フレームなし | |||||||||
概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |
java.lang.Objectjavax.lang.Variant
A base-class for variant-like data structure
Variant is also known as 'union'.
A variant value can represent one value among multiple choices.
From the functional viewpoint, variants are dual to records, or 'structs'.
入れ子クラスの概要 | |
static class |
Variant.InvalidTypeException
An exception class thrown when the type (tag) of a variant is not the one which the program requires. |
コンストラクタの概要 | |
protected |
Variant(int type)
Constructs a Variant object. |
メソッドの概要 | |
protected void |
assertType(int type)
Assure the type of this object. |
int |
getType()
Obtain the tag. |
java.lang.String |
toString()
Pretty-print this object. |
protected Variant.InvalidTypeException |
unsupportedException(java.lang.String where)
Helper method for generating InvalidTypeException |
protected Variant.InvalidTypeException |
unsupportedException(java.lang.String where,
java.lang.String message)
Helper method for generating InvalidTypeException |
クラス java.lang.Object から継承したメソッド |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
コンストラクタの詳細 |
protected Variant(int type)
Variant
object.
type
- Tagメソッドの詳細 |
public final int getType()
protected final void assertType(int type)
type
, InvalidTypeException
is thrown.
type
- Tag
Variant.InvalidTypeException
- when the assertion getType() == type
failed.protected final Variant.InvalidTypeException unsupportedException(java.lang.String where)
InvalidTypeException
where
- Place identifier.
InvalidTypeException
object.protected final Variant.InvalidTypeException unsupportedException(java.lang.String where, java.lang.String message)
InvalidTypeException
where
- Place identifier.
InvalidTypeException
object.public java.lang.String toString()
|
||||||||||
前のクラス 次のクラス | フレームあり フレームなし | |||||||||
概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |