public interface PVUnion extends PVField, Serializable
Modifier and Type | Field and Description |
---|---|
static int |
UNDEFINED_INDEX
Undefined index.
|
Modifier and Type | Method and Description |
---|---|
PVField |
get()
Get the
PVField value stored in the field. |
<T extends PVField> |
get(Class<T> c)
Get the
PVField value stored in the field. |
String |
getSelectedFieldName()
Get selected field name.
|
int |
getSelectedIndex()
Get selected field index.
|
Union |
getUnion()
Get the union introspection interface.
|
<T extends PVField> |
select(Class<T> c,
int index)
Select field (set index) and get the field at the index.
|
<T extends PVField> |
select(Class<T> c,
String fieldName)
Select field (set index) and get the field by given name.
|
PVField |
select(int index)
Select field (set index) and get the field at the index.
|
PVField |
select(String fieldName)
Select field (set index) and get the field by given name.
|
void |
set(int index,
PVField value)
Set the
PVField (by reference!) as field at given index. |
void |
set(PVField value)
Set the
PVField (by reference!) as selected field. |
void |
set(String fieldName,
PVField value)
Set the
PVField (by reference!) as field by given name. |
getField, getFieldName, getFieldOffset, getNextFieldOffset, getNumberFields, getParent, getPVAuxInfo, isImmutable, postPut, renameField, setImmutable, setPostHandler, setRequester, toString, toString, toString
getRequesterName, message
deserialize, serialize
static final int UNDEFINED_INDEX
null
value.Union getUnion()
PVField get()
PVField
value stored in the field.PVField
value of field, null
if getSelectedIndex() == UNDEFINED_INDEX
.<T extends PVField> T get(Class<T> c)
PVField
value stored in the field.c
- expected class of a requested field.PVField
value of field, null
if getSelectedIndex() == UNDEFINED_INDEX
.PVField select(int index)
index
- index of the field to select.null
if index == UNDEFINED_INDEX
.IllegalArgumentException
- if index is invalid (out of range).<T extends PVField> T select(Class<T> c, int index)
c
- expected class of a requested field.index
- index of the field to select.null
if index == UNDEFINED_INDEX
.IllegalArgumentException
- if index is invalid (out of range).PVField select(String fieldName)
fieldName
- the name of the field to select.IllegalArgumentException
- if field does not exist.<T extends PVField> T select(Class<T> c, String fieldName)
c
- expected class of a requested field.fieldName
- the name of the field to select.IllegalArgumentException
- if field does not exist.int getSelectedIndex()
String getSelectedFieldName()
void set(PVField value)
PVField
(by reference!) as selected field.
If a value is not a valid union field an IllegalArgumentException
exception is thrown.value
- the field to set.void set(int index, PVField value)
PVField
(by reference!) as field at given index.
If a value is not a valid union field an IllegalArgumentException
exception is thrown.
Use select(int)
to put by value.index
- index of a field to put.value
- the field to set.select(int)
void set(String fieldName, PVField value)
PVField
(by reference!) as field by given name.
If a value is not a valid union field an IllegalArgumentException
exception is thrown.
Use select(String)
to put by value.fieldName
- Name of the field to put.value
- the field to set.select(String)
Copyright © 2014. All Rights Reserved.