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 |
---|
Switch(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.
|
int |
getIndex()
Return the member index.
|
Type |
getMemberType()
Return the member type.
|
java.util.List<java.lang.Object> |
getRawValue()
Return the data value.
|
java.lang.Object |
getValue()
Return the member value.
|
boolean |
getValueAsBoolean()
Return the value of the member as a boolean.
|
char |
getValueAsChar()
Return the value of the member as a char.
|
boolean |
getValueAsData(Data<?> data)
Apply the value on another data union.
|
double |
getValueAsDouble()
Return the value of the member as a double.
|
float |
getValueAsFloat()
Return the value of the member as a float.
|
int |
getValueAsInt()
Return the value of the member as an int.
|
java.util.List<java.lang.Object> |
getValueAsList()
Return the value as a List.
|
short |
getValueAsShort()
Return the value of the member as a short.
|
java.lang.String |
getValueAsString()
Return the value of the member as a String.
|
short |
setSwitchValue(java.util.List<java.lang.Object> value)
Set the structure value.
|
boolean |
setValue(int index)
Set the default value of the Union for a specified variantType.
|
boolean |
setValue(int index,
java.lang.Object value)
Set the value of the Switch for a specified type index.
|
short |
setValue(java.lang.Object value)
Set the data value.
|
boolean |
setValue(java.lang.String name,
java.lang.Object value)
Set the value of the Switch for a specified type name.
|
copy, copy, getDataChangeBehavior, getDefinition, getDescription, getName, getTopic, getType, getValue, getValueAsArray, getValueAsByte, getValueAsDouble, getValueAsFloat, getValueAsJSON, getValueAsLong, getValueAsMap, getValueAsStructure, getValueAsUnion, getValueAsURL, getValueAsXML, hasChanged, isContinuous, isEqualsTo, isNumeric, setBooleanValue, setByteValue, setChanged, setCharValue, setDoubleValue, setDoubleValue, setFloatValue, setFloatValue, setIntValue, setLongValue, setShortValue, setStringValue, setValueFromInstance, touch
public Switch(ServiceDefinition.Data def)
def
- the ServiceDefinitionpublic short copy(Data<?> data)
copy
in class Data<SwitchType>
data
- the dataDataState
public short setSwitchValue(java.util.List<java.lang.Object> value)
value
- the valueDataState
public short setValue(java.lang.Object value)
setValue
in class Data<SwitchType>
value
- the valueDataState
public java.util.List<java.lang.Object> getRawValue()
public java.util.List<java.lang.Object> copyValue()
copyValue
in class Data<SwitchType>
public Data<?> clone() throws java.lang.CloneNotSupportedException
clone
in class Data<SwitchType>
java.lang.CloneNotSupportedException
public java.util.List<java.lang.Object> getValueAsList()
public boolean getValueAsData(Data<?> data)
getValueAsData
in class Data<SwitchType>
data
- the data unionpublic int getIndex()
public java.lang.Object getValue()
getValue
in class Data<SwitchType>
public boolean getValueAsBoolean()
getValueAsBoolean
in class Data<SwitchType>
public int getValueAsInt()
getValueAsInt
in class Data<SwitchType>
public char getValueAsChar()
getValueAsChar
in class Data<SwitchType>
public short getValueAsShort()
getValueAsShort
in class Data<SwitchType>
public float getValueAsFloat()
getValueAsFloat
in class Data<SwitchType>
public double getValueAsDouble()
getValueAsDouble
in class Data<SwitchType>
public java.lang.String getValueAsString()
getValueAsString
in class Data<SwitchType>
public Type getMemberType()
public boolean setValue(java.lang.String name, java.lang.Object value)
name
- the type namevalue
- the valuepublic boolean setValue(int index, java.lang.Object value)
index
- the indexvalue
- the valuepublic boolean setValue(int index)
index
- the indexCopyright ©2017-2023 Dassault Aviation. All Rights Reserved. Documentation and source under the LGPL v3 licence