Package gov.aps.jca

Class ValuedEnum

    • Constructor Detail

      • ValuedEnum

        protected ValuedEnum​(String name,
                             int value)
      • ValuedEnum

        protected ValuedEnum​(String name,
                             int value,
                             Map map)
    • Method Detail

      • getValue

        public final int getValue()
        Get value of enum item.
        Returns:
        the enum item's value.
      • isEqualTo

        public final boolean isEqualTo​(ValuedEnum other)
        Test if enum item is equal in value to other enum.
        Parameters:
        other - the other enum
        Returns:
        true if equal
      • isGreaterThan

        public final boolean isGreaterThan​(ValuedEnum other)
        Test if enum item is greater than in value to other enum.
        Parameters:
        other - the other enum
        Returns:
        true if greater than
      • isGreaterThanOrEqual

        public final boolean isGreaterThanOrEqual​(ValuedEnum other)
        Test if enum item is greater than or equal in value to other enum.
        Parameters:
        other - the other enum
        Returns:
        true if greater than or equal
      • isLessThan

        public final boolean isLessThan​(ValuedEnum other)
        Test if enum item is less than in value to other enum.
        Parameters:
        other - the other enum
        Returns:
        true if less than
      • isLessThanOrEqual

        public final boolean isLessThanOrEqual​(ValuedEnum other)
        Test if enum item is less than or equal in value to other enum.
        Parameters:
        other - the other enum
        Returns:
        true if less than or equal
      • toString

        public String toString()
        Override toString method to produce human readable description.
        Overrides:
        toString in class Enum
        Returns:
        String in the form type[name=value], eg.: JavaVersion[Java 1.0=100].