|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.prosysopc.ua.typedictionary.EnumerationSpecification
public class EnumerationSpecification
Definition of an OPC UA Enumeration. This class is used when parsing custom Structures from a TypeDictionary that have custom Enumerations defined as their fields.
| Constructor Summary | |
|---|---|
EnumerationSpecification(String name,
Map<Integer,String> intToStringEnumerationData)
Create a new EnumerationSpecification from the given data. |
|
| Method Summary | |
|---|---|
DynamicEnumeration |
createEnumerationFromInteger(int value)
Creates a DynamicEnumeration based on the given value in the context of this
Enumeration. |
DynamicEnumeration |
createEnumerationFromString(String value)
Creates a DynamicEnumeration based on the given value in the context of this
Enumeration. |
Set<Integer> |
getAllIntegerValues()
Returns all values of the Enumeration as integers. |
Set<String> |
getAllStringValues()
Returns all values of the Enumeration as Strings. |
Map<Integer,String> |
getIntToStringMappings()
Returns a map for Enumeration integer value to String mapping. |
String |
getName()
Returns the name of the Enumeration. |
Map<String,Integer> |
getStringToIntMappings()
Returns a map for Enumeration String value to int mapping. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public EnumerationSpecification(String name,
Map<Integer,String> intToStringEnumerationData)
EnumerationSpecification from the given data. Note that this class should
not be instantiated manually, but instead obtained from DynamicStructure's
FieldSpecification if present. Note that the value set of the given data should be
unique as well.
name - Name of the Enumeration.intToStringEnumerationData - Integer to String mapping data for the Enumeration.| Method Detail |
|---|
public DynamicEnumeration createEnumerationFromInteger(int value)
DynamicEnumeration based on the given value in the context of this
Enumeration.
value - the Enumeration value as integer
DynamicEnumeration that has the given value and matching String representation
of the value.
IllegalArgumentException - if this enumeration specification does not have mapping
defined for the given value, i.e. the given value is not part of the valid values for
this Enumeration.public DynamicEnumeration createEnumerationFromString(String value)
DynamicEnumeration based on the given value in the context of this
Enumeration.
value - the Enumeration value as String
DynamicEnumeration that has the given value and matching Integer representation
of the value.
IllegalArgumentException - if this enumeration specification does not have mapping
defined for the given value, i.e. the given value is not part of the valid values for
this Enumeration.public Set<Integer> getAllIntegerValues()
public Set<String> getAllStringValues()
public Map<Integer,String> getIntToStringMappings()
public String getName()
public Map<String,Integer> getStringToIntMappings()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||