Class EnumValue

    • Constructor Detail

      • EnumValue

        public EnumValue​(EnumValue value)
        Creates a new enum value.
        Parameters:
        value - the IVML enum literal
    • Method Detail

      • getName

        public java.lang.String getName()
        Returns the name of the enum literal.
        Specified by:
        getName in interface IResolvable
        Specified by:
        getName in class IvmlElement
        Returns:
        the name of the literal
      • getQualifiedName

        public java.lang.String getQualifiedName()
        Returns the qualified name of the enum literal.
        Specified by:
        getQualifiedName in class IvmlElement
        Returns:
        the qualified name of the literal
      • getDatatype

        public IDatatype getDatatype()
        Returns the IVML data type.
        Returns:
        the IVML data type
      • getType

        public TypeDescriptor<?> getType()
        Description copied from class: IvmlElement
        Returns the VIL type of the element.
        Specified by:
        getType in class IvmlElement
        Returns:
        the VIL type (may be a fake descriptor if not resolved / no advice)
      • getTypeName

        public java.lang.String getTypeName()
        Description copied from class: IvmlElement
        Returns the simple type name of the element.
        Specified by:
        getTypeName in class IvmlElement
        Returns:
        the simple type name
      • getQualifiedType

        public java.lang.String getQualifiedType()
        Description copied from class: IvmlElement
        Returns the qualified type name of the element.
        Specified by:
        getQualifiedType in class IvmlElement
        Returns:
        the qualified type name
      • getAttribute

        Attribute getAttribute​(int index)
        Description copied from class: IvmlElement
        Returns the specified attribute.
        Specified by:
        getAttribute in class IvmlElement
        Parameters:
        index - the 0-based index of the attribute to return
        Returns:
        the specified attribute
      • getAttributeCount

        int getAttributeCount()
        Description copied from class: IvmlElement
        Returns the number of attributes.
        Specified by:
        getAttributeCount in class IvmlElement
        Returns:
        the number of attributes
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object object)
        Overrides:
        equals in class java.lang.Object
      • getValue

        public java.lang.Object getValue()
        Description copied from class: IvmlElement
        Returns the (untyped) value of the decision variable.
        Specified by:
        getValue in class IvmlElement
        Returns:
        the value (may be null)
      • getElement

        public IvmlElement getElement​(java.lang.String name)
        Description copied from class: IvmlElement
        Returns the element matching the given (qualified) name.
        Specified by:
        getElement in class IvmlElement
        Parameters:
        name - the name to search for
        Returns:
        the matching element or null if not found
      • getStringValue

        public java.lang.String getStringValue()
        Description copied from class: IvmlElement
        Returns the string value of the decision variable.
        Specified by:
        getStringValue in class IvmlElement
        Returns:
        the value (may be null)
      • getIntegerValue

        public java.lang.Integer getIntegerValue()
        Description copied from class: IvmlElement
        Returns the integer value of the decision variable.
        Specified by:
        getIntegerValue in class IvmlElement
        Returns:
        the value (may be null)
      • getOrdinal

        public int getOrdinal()
        Returns the ordinal of the enum value.
        Returns:
        the ordinal
      • getRealValue

        public java.lang.Double getRealValue()
        Description copied from class: IvmlElement
        Returns the real value of the decision variable.
        Specified by:
        getRealValue in class IvmlElement
        Returns:
        the value (may be null)
      • getBooleanValue

        public java.lang.Boolean getBooleanValue()
        Description copied from class: IvmlElement
        Returns the boolean value of the decision variable.
        Specified by:
        getBooleanValue in class IvmlElement
        Returns:
        the value (may be null)
      • getEnumValue

        public EnumValue getEnumValue()
        Description copied from class: IvmlElement
        Returns the boolean value of the decision variable.
        Specified by:
        getEnumValue in class IvmlElement
        Returns:
        the value (may be null)
      • convert

        public static java.lang.String convert​(EnumValue value)
        Converts an Enum value to a String by returning its (qualified) name.
        Parameters:
        value - the value to be converted
        Returns:
        the qualified name