Data.Any, Data.Array, Data.Bool, Data.Byte, Data.Char, Data.Double, Data.Enum, Data.Float, Data.Int, Data.JSON, Data.Long, Data.MapData, Data.Nil, Data.Obj, Data.Short, Data.Str, Data.Structure, Data.Switch, Data.Union, Data.Url, Data.Void, Data.Xml
STATE_INVALID, STATE_MODIFIED, STATE_UNCHANGED
Constructor and Description |
---|
Structure(ServiceDefinition.Data def)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
Data<?> |
clone() |
short |
copy(Data<?> data)
Copy the value of another Data.
|
java.util.List<java.lang.Object> |
copyValue()
Copy the current value and return it.
|
java.lang.Object |
getFieldValue(java.lang.String field)
Return the value of a field.
|
java.util.List<java.lang.Object> |
getFieldValueAsArray(java.lang.String field)
Return the value of a field as an array.
|
boolean |
getFieldValueAsBoolean(java.lang.String field)
Return the value of a field as a boolean.
|
char |
getFieldValueAsChar(java.lang.String field)
Return the value of a field as a char.
|
Data<?> |
getFieldValueAsData(java.lang.String field)
Return the value of a field as a Data.
|
boolean |
getFieldValueAsData(java.lang.String field,
Data<?> data)
Return the value of a field as a data.
|
double |
getFieldValueAsDouble(java.lang.String field)
Return the value of a field as a double.
|
float |
getFieldValueAsFloat(java.lang.String field)
Return the value of a field as a float.
|
int |
getFieldValueAsInt(java.lang.String field)
Return the value of a field as an int.
|
short |
getFieldValueAsShort(java.lang.String field)
Return the value of a field as a short.
|
java.lang.String |
getFieldValueAsString(java.lang.String field)
Return the value of a field as a String.
|
java.util.List<java.lang.Object> |
getFieldValueAsStructure(java.lang.String field)
Return the value of a field as an array.
|
java.util.List<java.lang.Object> |
getValue()
Return the data value.
|
boolean |
getValueAsData(Data<?> data)
Apply the value on another data Structure.
|
java.util.List<java.lang.Object> |
getValueAsList()
Return the value as a List.
|
java.lang.String |
getValueAsString()
Return the value as a String.
|
boolean |
setFieldBooleanValue(java.lang.String field,
boolean fieldValue)
Set the value of a field as a boolean.
|
boolean |
setFieldCharValue(java.lang.String field,
char fieldValue)
Set the value of a field as a char.
|
boolean |
setFieldDoubleValue(java.lang.String field,
double fieldValue)
Set the value of a field as a double.
|
boolean |
setFieldFloatValue(java.lang.String field,
float fieldValue)
Set the value of a field as a float.
|
boolean |
setFieldIntValue(java.lang.String field,
int fieldValue)
Set the value of a field as a int.
|
boolean |
setFieldShortValue(java.lang.String field,
short fieldValue)
Set the value of a field as a short.
|
boolean |
setFieldStringValue(java.lang.String field,
java.lang.String fieldValue)
Set the value of a field as a String.
|
boolean |
setFieldValue(java.lang.String field,
java.lang.Object fieldValue)
Set the value of a field.
|
short |
setStructureValue(java.util.List<java.lang.Object> value)
Set the structure value.
|
short |
setValue(java.lang.Object value)
Set the data value.
|
void |
setValue(java.lang.Object v,
int index)
Set the value of a field of the structure.
|
copy, copy, getDataChangeBehavior, getDefinition, getDescription, getName, getTopic, getType, getValue, getValueAsArray, getValueAsBoolean, getValueAsByte, getValueAsChar, getValueAsDouble, getValueAsDouble, getValueAsFloat, getValueAsFloat, getValueAsInt, getValueAsJSON, getValueAsLong, getValueAsMap, getValueAsShort, getValueAsStructure, getValueAsUnion, getValueAsURL, getValueAsXML, hasChanged, isContinuous, isEqualsTo, isNumeric, setBooleanValue, setByteValue, setChanged, setCharValue, setDoubleValue, setDoubleValue, setFloatValue, setFloatValue, setIntValue, setLongValue, setShortValue, setStringValue, setValueFromInstance, touch
public Structure(ServiceDefinition.Data def)
def
- the ServiceDefinitionpublic short copy(Data<?> data)
copy
in class Data<StructType>
data
- the dataDataState
public short setStructureValue(java.util.List<java.lang.Object> value)
value
- the valueDataState
public short setValue(java.lang.Object value)
setValue
in class Data<StructType>
value
- the valueDataState
public void setValue(java.lang.Object v, int index)
v
- the valueindex
- the index of the field in the fields listpublic java.util.List<java.lang.Object> getValueAsList()
public boolean getValueAsData(Data<?> data)
getValueAsData
in class Data<StructType>
data
- the data Structurepublic java.lang.String getValueAsString()
getValueAsString
in class Data<StructType>
public boolean getFieldValueAsBoolean(java.lang.String field)
field
- the fieldpublic boolean setFieldBooleanValue(java.lang.String field, boolean fieldValue)
field
- the field namefieldValue
- the field valuepublic int getFieldValueAsInt(java.lang.String field)
field
- the fieldpublic boolean setFieldIntValue(java.lang.String field, int fieldValue)
field
- the field namefieldValue
- the field valuepublic char getFieldValueAsChar(java.lang.String field)
field
- the fieldpublic boolean setFieldCharValue(java.lang.String field, char fieldValue)
field
- the field namefieldValue
- the field valuepublic short getFieldValueAsShort(java.lang.String field)
field
- the fieldpublic boolean setFieldShortValue(java.lang.String field, short fieldValue)
field
- the field namefieldValue
- the field valuepublic float getFieldValueAsFloat(java.lang.String field)
field
- the fieldpublic boolean setFieldFloatValue(java.lang.String field, float fieldValue)
field
- the field namefieldValue
- the field valuepublic double getFieldValueAsDouble(java.lang.String field)
field
- the fieldpublic boolean setFieldDoubleValue(java.lang.String field, double fieldValue)
field
- the field namefieldValue
- the field valuepublic java.lang.String getFieldValueAsString(java.lang.String field)
field
- the fieldpublic boolean setFieldStringValue(java.lang.String field, java.lang.String fieldValue)
field
- the field namefieldValue
- the field valuepublic java.lang.Object getFieldValue(java.lang.String field)
field
- the fieldpublic Data<?> getFieldValueAsData(java.lang.String field)
field
- the fieldpublic boolean getFieldValueAsData(java.lang.String field, Data<?> data)
field
- the fielddata
- the datapublic boolean setFieldValue(java.lang.String field, java.lang.Object fieldValue)
field
- the field namefieldValue
- the field valuepublic java.util.List<java.lang.Object> getFieldValueAsArray(java.lang.String field)
field
- the fieldpublic java.util.List<java.lang.Object> getFieldValueAsStructure(java.lang.String field)
field
- the fieldpublic java.util.List<java.lang.Object> getValue()
getValue
in class Data<StructType>
public java.util.List<java.lang.Object> copyValue()
copyValue
in class Data<StructType>
public Data<?> clone() throws java.lang.CloneNotSupportedException
clone
in class Data<StructType>
java.lang.CloneNotSupportedException
Copyright ©2017-2023 Dassault Aviation. All Rights Reserved. Documentation and source under the LGPL v3 licence