Class CimEnumeration

All Implemented Interfaces:
CimEventGenerator

public class CimEnumeration extends NamedElement
Class to represent a CIM Enumeration. CIM Enumerations are constructed by the MOFParser.
Author:
Sharad Singhal
  • Method Details

    • getDataType

      public DataType getDataType()
      Get the primitive data type for all values in this enumeration
      Returns:
      - data type for all values in this enumeration
    • getKeys

      public Set<String> getKeys()
      Get the set of keys defined in this enumeration (or its superTypes)
      Returns:
      - set of keys (mixed case) in the enumeration
    • hasKey

      public boolean hasKey(String key)
      Check if this enumeration (or one of its superTypes) declares a given key
      Parameters:
      key - - key to check
      Returns:
      - true if the given key is declared, false otherwise
    • getDataValue

      public DataValue getDataValue(String key)
      Get the primitive dataValue corresponding to a given key
      Parameters:
      key - - name of the enumeration element
      Returns:
      - dataValue corresponding to the enumeration element. Null if no such element exists
    • getValue

      public EnumerationValue getValue(String key)
      Get the enumeration value corresponding to a given key
      Parameters:
      key - - name of the enumeration element
      Returns:
      - enumerationValue corresponding to the element. Null if no such element exists
    • hasDefinedValues

      public boolean hasDefinedValues()
      Check if this enumeration has explicitly defined values
      Returns:
      - true if the enumeration has explicit values defined
    • bind

      public Class<?> bind()
      Bind this CimEnum to a java Enum
      Returns:
      - bound java Enum
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class NamedElement
    • getName

      public String getName()
      Get the name of this element
      Returns:
      - name of this element
      See Also:
    • getLowerCaseName

      public String getLowerCaseName()
      Get the case-normalized (lower case) name for this element
      Returns:
      - name of this element normalized to lower case
      See Also:
    • getElementType

      public ElementType getElementType()
      Get the CIM type of this element
      Returns:
      - CIMType for this element
      See Also:
    • toMOF

      public String toMOF()
      Return the MOF representation of this element
      Returns:
      - String containing MOF representation of this element
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object