public class Structure extends Variable
Modifier and Type | Class and Description |
---|---|
static class |
Structure.Field
Represent a structure field.
|
Modifier and Type | Field and Description |
---|---|
protected java.util.Set<Structure.Field> |
fields |
name, struct, type, value
block, root
STRUCT_ARRAY, STRUCT_SCALAR, STRUCT_STRUCTURE, TYPE_BOOL, TYPE_DYNAMIC, TYPE_FLOAT, TYPE_INTEGER, TYPE_NUMERIC, TYPE_STRING, TYPE_UNDEF
Constructor and Description |
---|
Structure(java.lang.String name)
Constructor.
|
Structure(java.lang.String name,
short type)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addField(Structure.Field field)
Add a field for this structure.
|
java.lang.Object |
clone() |
java.lang.String |
getExpressionName()
Return the structure name.
|
java.util.Set<Structure.Field> |
getFields()
Return the structure fields.
|
short |
getResultStructure()
Return the structure of the result for the expression.
|
short |
getResultType()
Return the type of the Variable.
|
void |
setValue(java.lang.String varName,
java.lang.Object value)
Do nothing.
|
equals, getVariable, getVariables, hashCode, isLocal
checkType, eval, evalAsBoolean, evalAsFloat, evalAsInt, getExpression, getName, getStructure, getType, getValue, getValueAsBoolean, getValueAsFloat, getValueAsInt, initType, setDefaultValue, setName, setStructure, setType, setType, setValue, setValueAsBoolean, setValueAsFloat, setValueAsInt
getParentBlock, getRoot, setParentBlock, setRoot
finalize, getClass, notify, notifyAll, toString, wait, wait, wait
getLocalVariable, getLocalVariables, getParentBlock, getRoot, getVariable, getVariables, hasVariable, hasVariable, removeVariable, setParentBlock
protected java.util.Set<Structure.Field> fields
public Structure(java.lang.String name)
name
- the structure namepublic Structure(java.lang.String name, short type)
name
- the structure nametype
- the structure typepublic java.lang.Object clone() throws java.lang.CloneNotSupportedException
clone
in interface Expression
clone
in class Variable
java.lang.CloneNotSupportedException
public void addField(Structure.Field field)
field
- the fieldpublic java.util.Set<Structure.Field> getFields()
public java.lang.String getExpressionName()
getExpressionName
in interface Expression
getExpressionName
in class Variable
public short getResultType()
Variable
getResultType
in interface Expression
getResultType
in class Variable
public short getResultStructure()
Expression
ExpressionType.STRUCT_SCALAR
: a scalar valueExpressionType.STRUCT_ARRAY
: an array valuegetResultStructure
in interface Expression
getResultStructure
in class Variable
Copyright © 2018 Herve Girod. All Rights Reserved. Documentation and source under the BSD licence