fr.emn.reactiveinput
Class SlotType

java.lang.Object
  extended byfr.emn.reactiveinput.Enum
      extended byfr.emn.reactiveinput.SlotType

public class SlotType
extends Enum

Primitive types used by Value + utility methods.


Field Summary
static int ANY
           
static int BOOLEAN
           
static int DOUBLE
           
static int INT
           
static int NULL
          Any type
static int OBJECT
           
static int STRING
           
 
Fields inherited from class fr.emn.reactiveinput.Enum
value
 
Constructor Summary
SlotType(int value)
           
 
Method Summary
 java.lang.String[] getChoices()
           
static int getInfType(int type1, int type2)
          Utility method
static int getInfType(Slot[] slots)
          Utility method used in Out.getConnectedType()
static int getSupType(int type1, int type2)
          Utility method
static int getSupType(Slot[] slots)
          Utility method
static int getType(java.lang.Class type)
          Utility method to obtain SlotType constant from a class
static boolean isSubtype(int subtype, int type)
          Returns true if the first argument is a subtype of the second.
static java.lang.String toString(int type)
          Converts a type into a string.
static int toType(java.lang.String s)
          Converts a string into a type.
 
Methods inherited from class fr.emn.reactiveinput.Enum
copy, create, getValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NULL

public static final int NULL
Any type

See Also:
Constant Field Values

BOOLEAN

public static final int BOOLEAN
See Also:
Constant Field Values

INT

public static final int INT
See Also:
Constant Field Values

DOUBLE

public static final int DOUBLE
See Also:
Constant Field Values

STRING

public static final int STRING
See Also:
Constant Field Values

OBJECT

public static final int OBJECT
See Also:
Constant Field Values

ANY

public static final int ANY
See Also:
Constant Field Values
Constructor Detail

SlotType

public SlotType(int value)
Method Detail

getChoices

public java.lang.String[] getChoices()
Specified by:
getChoices in class Enum

getType

public static int getType(java.lang.Class type)
Utility method to obtain SlotType constant from a class


getInfType

public static int getInfType(Slot[] slots)
Utility method used in Out.getConnectedType()


getInfType

public static int getInfType(int type1,
                             int type2)
Utility method


getSupType

public static int getSupType(Slot[] slots)
Utility method


getSupType

public static int getSupType(int type1,
                             int type2)
Utility method


isSubtype

public static boolean isSubtype(int subtype,
                                int type)
Returns true if the first argument is a subtype of the second.


toString

public static java.lang.String toString(int type)
Converts a type into a string. Returns null if bad type number.


toType

public static int toType(java.lang.String s)
Converts a string into a type. Case ignored.

Returns -1 if bad string.