org.nodal.model
Class Seq.SeqType

java.lang.Object
  extended byorg.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

Field Summary
static Seq.SeqType BOOLEAN
           
static Seq.SeqType BYTE
           
static Seq.SeqType CHARACTER
           
static Seq.SeqType DOUBLE
           
static Seq.SeqType FLOAT
           
static Seq.SeqType INT
           
static Seq.SeqType LONG
           
static Seq.SeqType NODE
           
static Seq.SeqType OBJECT
           
static Seq.SeqType SHORT
           
 
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
 

Field Detail

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
Method Detail

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