Interface PEnumValue<T>

  • All Superinterfaces:
    java.lang.Comparable<T>, net.morimekta.util.Numeric, PValue<T>, net.morimekta.util.Stringable
    All Known Implementing Classes:
    PApplicationExceptionType, PServiceCallType

    public interface PEnumValue<T>
    extends PValue<T>, net.morimekta.util.Stringable, net.morimekta.util.Numeric
    Base interface for enum values.
    • Method Summary

      All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods 
      Modifier and Type Method Description
      PEnumDescriptor descriptor()  
      default int getId()
      Deprecated.
      since 1.10.0 Use Numeric.asInteger() instead.
      default java.lang.String getName()
      Deprecated.
      since 1.10.0 Use Numeric.asInteger() instead.
      default int getValue()
      Deprecated.
      since 0.5.0 Use Numeric.asInteger() or getId() instead.
      • Methods inherited from interface java.lang.Comparable

        compareTo
      • Methods inherited from interface net.morimekta.util.Numeric

        asInteger
      • Methods inherited from interface net.morimekta.util.Stringable

        asString
    • Method Detail

      • getId

        @Deprecated
        default int getId()
        Deprecated.
        since 1.10.0 Use Numeric.asInteger() instead. Will be removed in a future version, but kept for now as it is too widely used to be removed immediately.
        Method for getting the ID of the value that is a bit more accurate when reading code than Numeric.asInteger()
        Returns:
        The ID value for the enum.
      • getName

        @Deprecated
        @Nonnull
        default java.lang.String getName()
        Deprecated.
        since 1.10.0 Use Numeric.asInteger() instead. Will be removed in a future version, but kept for now as it is too widely used to be removed immediately.
        Method for getting the name of the value that is a bit more accurate when reading code than Stringable.asString()
        Returns:
        The name of the enum value.
      • getValue

        @Deprecated
        default int getValue()
        Deprecated.
        since 0.5.0 Use Numeric.asInteger() or getId() instead. Will be removed in a future version, but kept for now as it is too widely used to be removed immediately.
        Returns:
        The numeric value for the enum.