|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eclipse.emf.common.util.AbstractEnumerator
com.ibm.carma.model.VariableType
public final class VariableType
A representation of the literals of the enumeration 'Variable Type', and utility methods for working with them. Supported conversions:
| CARMA Type | Java Type |
STRING
| String
|
BOOLEAN
| Boolean
|
BYTE
| Byte
|
CHAR
| Character
|
DOUBLE
| Double
|
FLOAT
| Float
|
INT
| Integer
|
LONG
| Long
|
ModelPackage.getVariableType()| Field Summary | |
|---|---|
static int |
BOOLEAN
The 'BOOLEAN' literal value. |
static VariableType |
BOOLEAN_LITERAL
The 'BOOLEAN' literal object. |
static int |
BYTE
The 'BYTE' literal value. |
static VariableType |
BYTE_LITERAL
The 'BYTE' literal object. |
static int |
CHAR
The 'CHAR' literal value. |
static VariableType |
CHAR_LITERAL
The 'CHAR' literal object. |
static java.lang.String |
copyright
|
static int |
DOUBLE
The 'DOUBLE' literal value. |
static VariableType |
DOUBLE_LITERAL
The 'DOUBLE' literal object. |
static int |
FLOAT
The 'FLOAT' literal value. |
static VariableType |
FLOAT_LITERAL
The 'FLOAT' literal object. |
static int |
INT
The 'INT' literal value. |
static VariableType |
INT_LITERAL
The 'INT' literal object. |
static int |
LONG
The 'LONG' literal value. |
static VariableType |
LONG_LITERAL
The 'LONG' literal object. |
static int |
STRING
The 'STRING' literal value. |
static VariableType |
STRING_LITERAL
The 'STRING' literal object. |
static java.util.List |
VALUES
A public read-only list of all the 'Variable Type' enumerators. |
| Method Summary | |
|---|---|
boolean |
checkVariableLength(java.lang.Object value,
int length)
Check that the variable value matches the length contraint for the variable type |
boolean |
checkVariableValue(java.lang.Object value)
Performs a check that the given value is compatible with the variable type |
java.lang.Object |
convertToVaribableType(java.lang.String toConvert)
Converts the string value to the appropriate object type expected by the CARMA system based on the VariableType. |
static VariableType |
get(int value)
Returns the 'Variable Type' literal with the specified integer value. |
static VariableType |
get(java.lang.Object value)
Returns the 'Variable Type' literal for the type of the object value. |
static VariableType |
get(java.lang.String literal)
Returns the 'Variable Type' literal with the specified literal value. |
static VariableType |
getByName(java.lang.String name)
Returns the 'Variable Type' literal with the specified name. |
java.lang.Class<?> |
getClassType()
The Java class associated with the given variable |
| Methods inherited from class org.eclipse.emf.common.util.AbstractEnumerator |
|---|
getLiteral, getName, getValue, toString |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String copyright
public static final int STRING
STRING_LITERAL,
Constant Field Valuespublic static final int INT
INT_LITERAL,
Constant Field Valuespublic static final int FLOAT
FLOAT_LITERAL,
Constant Field Valuespublic static final int BYTE
BYTE_LITERAL,
Constant Field Valuespublic static final int DOUBLE
DOUBLE_LITERAL,
Constant Field Valuespublic static final int CHAR
CHAR_LITERAL,
Constant Field Valuespublic static final int LONG
LONG_LITERAL,
Constant Field Valuespublic static final int BOOLEAN
BOOLEAN_LITERAL,
Constant Field Valuespublic static final VariableType STRING_LITERAL
STRINGpublic static final VariableType INT_LITERAL
INTpublic static final VariableType FLOAT_LITERAL
FLOATpublic static final VariableType BYTE_LITERAL
BYTEpublic static final VariableType DOUBLE_LITERAL
DOUBLEpublic static final VariableType CHAR_LITERAL
CHARpublic static final VariableType LONG_LITERAL
LONGpublic static final VariableType BOOLEAN_LITERAL
BOOLEANpublic static final java.util.List VALUES
| Method Detail |
|---|
public static VariableType get(java.lang.String literal)
public static VariableType getByName(java.lang.String name)
public static VariableType get(int value)
public java.lang.Class<?> getClassType()
public static VariableType get(java.lang.Object value)
value - the object to inspect and determine the type of
public java.lang.Object convertToVaribableType(java.lang.String toConvert)
throws ConversionException
VariableType. Inspect the list of convertions
supported by the class for conversion types.
toConvert - the string representation of the variable value
ConversionException - could not perform the conversion. The value is not properly formatted for the expected type.public boolean checkVariableValue(java.lang.Object value)
value - the value of the variable to check that the value is appropriate
public boolean checkVariableLength(java.lang.Object value,
int length)
value - the variable valuelength - the length contstraint for the value
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||