org.nodal.model
Class Seq.SeqType
java.lang.Object
org.nodal.model.Seq.SeqType
- Enclosing class:
- Seq
- public static final class Seq.SeqType
- extends java.lang.Object
A type-safe enum for identifying the type of a Seq object. Usable to
verify downcasts. Implements a very simple numeric pyramid and allows one
to check the downcastability of interfaces simply.
- Author:
- leei
Method Summary |
boolean |
hasInterface(Seq.SeqType type)
Returns true if this SeqType instance guarantees the named interface. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
OBJECT
public static final Seq.SeqType OBJECT
BOOLEAN
public static final Seq.SeqType BOOLEAN
CHARACTER
public static final Seq.SeqType CHARACTER
DOUBLE
public static final Seq.SeqType DOUBLE
LONG
public static final Seq.SeqType LONG
FLOAT
public static final Seq.SeqType FLOAT
INT
public static final Seq.SeqType INT
SHORT
public static final Seq.SeqType SHORT
BYTE
public static final Seq.SeqType BYTE
NODE
public static final Seq.SeqType NODE
hasInterface
public boolean hasInterface(Seq.SeqType type)
- Returns true if this SeqType instance guarantees the named interface.
In other words, can a Seq having this type be cast to the interface
associated with the type value.
- Parameters:
type
- the TypeSeq enum naming the requested interface
- Returns:
- true if a Seq with this type can be cast to the interface named