Class ExpandableStringEnum<T extends ExpandableStringEnum<T>>

  • Type Parameters:
    T - A specific expandable enum type.

    public abstract class ExpandableStringEnum<T extends ExpandableStringEnum<T>>
    extends java.lang.Object
    Base implementation for expandable, single string enums.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object obj)  
      protected static <T extends ExpandableStringEnum<T>>
      T
      fromString​(java.lang.String name, java.lang.Class<T> clazz)
      Creates an instance of the specific expandable string enum from a String.
      int hashCode()  
      java.lang.String toString()  
      protected static <T extends ExpandableStringEnum<T>>
      java.util.Collection<T>
      values​(java.lang.Class<T> clazz)
      Gets a collection of all known values to an expandable string enum type.
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • ExpandableStringEnum

        public ExpandableStringEnum()
    • Method Detail

      • fromString

        protected static <T extends ExpandableStringEnum<T>> T fromString​(java.lang.String name,
                                                                          java.lang.Class<T> clazz)
        Creates an instance of the specific expandable string enum from a String.
        Type Parameters:
        T - The class of the expandable string enum.
        Parameters:
        name - The value to create the instance from.
        clazz - The class of the expandable string enum.
        Returns:
        The expandable string enum instance.
      • values

        protected static <T extends ExpandableStringEnum<T>> java.util.Collection<T> values​(java.lang.Class<T> clazz)
        Gets a collection of all known values to an expandable string enum type.
        Type Parameters:
        T - The class of the expandable string enum.
        Parameters:
        clazz - The class of the expandable string enum.
        Returns:
        A collection of all known values for the given clazz.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • hashCode

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

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object