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.
      • getComment

        java.lang.String getComment​(java.lang.String name)
        Get the comment for the given name.
        Parameters:
        name - name of the entry.
        Returns:
        the comment or the empty string if the name does not exist in this enum or if no comment is set.
      • 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. The returned names are first sorted by the enum int value, then sub-sorted by name value where there are multiple name values per int value.
        Returns:
        the names of the enum entries.
      • getCount

        int getCount()
        Get the number of entries in this Enum.
        Returns:
        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
      • add

        void add​(java.lang.String name,
                 long value,
                 java.lang.String comment)
        Add a enum entry.
        Parameters:
        name - name of the new entry
        value - value of the new entry
        comment - comment 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 - the 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.)
        bitLength - the bit length
        Returns:
        formatted integer string