Class EnumOption<T extends java.lang.Enum<T>>

  • public class EnumOption<T extends java.lang.Enum<T>>
    extends Option<T>
    • Constructor Summary

      Constructor Description
      EnumOption​(java.lang.String key, T defaultValue, java.lang.Class<T> enumClass)  
    • Constructor Detail

      • EnumOption

        public EnumOption​(@NonNls @NotNull
                          java.lang.String key,
                          T defaultValue,
                          java.lang.Class<T> enumClass)
        key - name of the parameter. Used in equals and hashCode
        defaultValue - default value for this option, if not specified
    • Method Detail

      • fromString

        public T fromString​(@NotNull
                            java.lang.String value)
        Description copied from class: Option
        Option values are serialized to strings using toString() call. To restore option value from string this method is used
        Specified by:
        fromString in class Option<T extends java.lang.Enum<T>>
        value - serialized option value Object.toString() method is used for serialization)
        deserialized value
      • toString

        public java.lang.String toString​(@NotNull
                                         T value)
        Description copied from class: Option
        Serialize option value to string
        Specified by:
        toString in class Option<T extends java.lang.Enum<T>>
        value - value to serialize
        serialized option value