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 |
---|
Union(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.
|
Type |
getMemberType()
Return the member type.
|
java.lang.Object |
getMemberValue()
Return the member value.
|
boolean |
getMemberValueAsBoolean()
Return the value of the member as a boolean.
|
char |
getMemberValueAsChar()
Return the value of the member as a char.
|
double |
getMemberValueAsDouble()
Return the value of the member as a double.
|
float |
getMemberValueAsFloat()
Return the value of the member as a float.
|
int |
getMemberValueAsInt()
Return the value of the member as an int.
|
short |
getMemberValueAsShort()
Return the value of the member as a short.
|
java.lang.String |
getMemberValueAsString()
Return the value of the member as a String.
|
java.util.List<java.lang.Object> |
getValue()
Return the data value.
|
boolean |
getValueAsData(Data<?> data)
Apply the value on another data union.
|
java.util.List<java.lang.Object> |
getValueAsList()
Return the value as a List.
|
java.lang.String |
getValueAsString()
Return a value as a String.
|
int |
getVariant()
Return the member variant.
|
boolean |
setMemberValue(int variant)
Set the default value of the Union for a specified variantType.
|
boolean |
setMemberValue(int variant,
java.lang.Object value)
Set the value of the Union for a specified variantType.
|
short |
setMemberValue(java.lang.String name,
java.lang.Object value)
Set the data value.
|
short |
setUnionValue(java.util.List<java.lang.Object> value)
Set the structure value.
|
short |
setValue(java.lang.Object value)
Set the data value.
|
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 Union(ServiceDefinition.Data def)
def
- the ServiceDefinitionpublic short copy(Data<?> data)
public short setUnionValue(java.util.List<java.lang.Object> value)
value
- the valueDataState
public short setMemberValue(java.lang.String name, java.lang.Object value)
name
- the variant namevalue
- the member valueDataState
public short setValue(java.lang.Object value)
public java.util.List<java.lang.Object> getValue()
public java.util.List<java.lang.Object> copyValue()
public Data<?> clone() throws java.lang.CloneNotSupportedException
public java.util.List<java.lang.Object> getValueAsList()
public boolean getValueAsData(Data<?> data)
getValueAsData
in class Data<UnionType>
data
- the data unionpublic int getVariant()
public java.lang.Object getMemberValue()
public boolean getMemberValueAsBoolean()
public int getMemberValueAsInt()
public char getMemberValueAsChar()
public short getMemberValueAsShort()
public float getMemberValueAsFloat()
public double getMemberValueAsDouble()
public java.lang.String getMemberValueAsString()
public Type getMemberType()
public boolean setMemberValue(int variant, java.lang.Object value)
variant
- the variantTypevalue
- the member valuepublic boolean setMemberValue(int variant)
variant
- the variantTypepublic java.lang.String getValueAsString()
getValueAsString
in class Data<UnionType>
Copyright ©2017-2023 Dassault Aviation. All Rights Reserved. Documentation and source under the LGPL v3 licence