|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object jwo.landserf.script.ScriptVariable
public class ScriptVariable
Stores a LandScript variable. This can be a numeric scalar value, a string or an entire spatial object.
Field Summary | |
---|---|
static int |
RASTER_VAR
Indicates that variable stores a raster map. |
static int |
SCALAR_VAR
Indicates that variable is scalar. |
static int |
SPATIAL_VAR
Indicates that variable stores an unspecified spatial object. |
static int |
STRING_VAR
Indicates that variable is a string. |
static int |
VECTOR_VAR
Indicates that variable stores a vector map. |
Constructor Summary | |
---|---|
ScriptVariable(int varType,
Object varValue)
Stores the given variable value of the given type. |
Method Summary | |
---|---|
int |
getType()
Reports the type of variable stored. |
String |
getTypeAsString()
Reports the type of variable stored as a string message. |
static String |
getTypeAsString(int type)
Reports the given variable type as a string message. |
Object |
getValue()
Reports the contents of the stored variable. |
void |
setValue(Object newValue)
Sets the contents of the stored variable. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int SCALAR_VAR
public static final int STRING_VAR
public static final int RASTER_VAR
public static final int VECTOR_VAR
public static final int SPATIAL_VAR
Constructor Detail |
---|
public ScriptVariable(int varType, Object varValue)
varType
- Type of variable to store (SCALAR_VAR, RASTER_VAR etc.).varValue
- Value of the variable.Method Detail |
---|
public int getType()
public Object getValue()
public void setValue(Object newValue)
getType()
.
newValue
- New value to be stored.public String getTypeAsString()
public static String getTypeAsString(int type)
type
- Type of variable. Should be one of SCALAR_VAR
,
STRING_VAR
, RASTER_VAR
,
VECTOR_VAR
or SPATIAL_VAR
.
- Returns:
- Text describing the type of variable
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |