public interface Union extends Field
Modifier and Type | Field and Description |
---|---|
static String |
ANY_ID
Default variant union ID.
|
static String |
DEFAULT_ID
Default union ID.
|
Modifier and Type | Method and Description |
---|---|
Field |
getField(int fieldIndex)
Get a sub fields by index.
|
Field |
getField(String fieldName)
Get the Field for the specified fieldName
|
int |
getFieldIndex(String fieldName)
Get the index of the specified field.
|
String |
getFieldName(int fieldIndex)
Get the name of the subfield by index.
|
String[] |
getFieldNames()
Get the array of the subfield names.
|
Field[] |
getFields()
Get a list of union fields (members).
|
boolean |
isVariant()
Check if this union is variant union (aka any type).
|
getID, getType, toString, toString, toString
deserialize, serialize
static final String DEFAULT_ID
static final String ANY_ID
Field getField(String fieldName)
fieldName
- The name of the field.int getFieldIndex(String fieldName)
fieldName
- The name of the field.Field[] getFields()
null
.Field getField(int fieldIndex)
fieldIndex
- The field index.String[] getFieldNames()
String getFieldName(int fieldIndex)
fieldIndex
- The field index.boolean isVariant()
true
if this union is variant union, otherwise false
.Copyright © 2014. All Rights Reserved.