com.prosysopc.ua.typedictionary
Class DynamicEnumeration

java.lang.Object
  extended by com.prosysopc.ua.typedictionary.DynamicEnumeration
All Implemented Interfaces:
org.opcfoundation.ua.builtintypes.Enumeration

public class DynamicEnumeration
extends Object
implements org.opcfoundation.ua.builtintypes.Enumeration

A class to represent (any) custom Enumeration. Used when reading custom Structures with TypeDictionary.


Constructor Summary
DynamicEnumeration(String valueAsString, int valueAsInt)
          Creates new DynamicEnumeration from the given values.
 
Method Summary
 boolean equals(Object obj)
           
 int getValue()
          Returns the Enumeration value as integer.
 String getValueAsString()
          Returns the Enumeration value as String.
 int hashCode()
           
 String toString()
           
static DynamicEnumeration valueOf(int value)
          Creates a DynamicEnumeration with the given value.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DynamicEnumeration

public DynamicEnumeration(String valueAsString,
                          int valueAsInt)
Creates new DynamicEnumeration from the given values. NOTE! this constructor does not validate that the given parameters match to an actual Enumeration. If possible, DynamicEnumerations should be constructed from EnumerationSpecification instead.

Parameters:
valueAsString - String value for the given integer value
valueAsInt - value of the Enumeration
Method Detail

valueOf

public static DynamicEnumeration valueOf(int value)
Creates a DynamicEnumeration with the given value. String value will be null. NOTE! this method exists for serialization purposes and should not be called manually. Instead the DynamicEnumeration should be obtained from EnumerationSpecification.


equals

public boolean equals(Object obj)
Overrides:
equals in class Object

getValue

public int getValue()
Returns the Enumeration value as integer.

Specified by:
getValue in interface org.opcfoundation.ua.builtintypes.Enumeration

getValueAsString

public String getValueAsString()
Returns the Enumeration value as String.


hashCode

public int hashCode()
Overrides:
hashCode in class Object

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2018. All rights reserved.