Interface Enum

    • Method Detail

      • getValue

        long getValue​(java.lang.String name)
               throws java.util.NoSuchElementException
        Get the value for the given name.
        Parameters:
        name - name of the entry
        Returns:
        the value
        Throws:
        java.util.NoSuchElementException - if the name does not exist in this Enum
      • getName

        java.lang.String getName​(long value)
        Get the name for the given value.
        Parameters:
        value - value of the enum entry.
        Returns:
        null if the name with the given value was not found.
      • getValues

        long[] getValues()
        Get the values of the enum entries.
        Returns:
        values sorted in ascending order
      • getNames

        java.lang.String[] getNames()
        Get the names of the enum entries.
      • getCount

        int getCount()
        Get the number of entries in this Enum.
      • add

        void add​(java.lang.String name,
                 long value)
        Add a enum entry.
        Parameters:
        name - name of the new entry
        value - value of the new entry
      • remove

        void remove​(java.lang.String name)
        Remove the enum entry with the given name.
        Parameters:
        name - name of entry to remove.
      • setDescription

        void setDescription​(java.lang.String description)
        Set the description for this Enum.
        Specified by:
        setDescription in interface DataType
        Parameters:
        description -
      • getRepresentation

        java.lang.String getRepresentation​(java.math.BigInteger bigInt,
                                           Settings settings,
                                           int bitLength)
        Get enum representation of the big-endian value.
        Parameters:
        bigInt - BigInteger value with the appropriate sign
        settings - integer format settings (PADDING, FORMAT, etc.)
        Returns:
        formatted integer string