Class StringOption


  • public class StringOption
    extends Option<java.lang.String>
    String option
    See Also:
    Option
    • Constructor Summary

      Constructors 
      Constructor Description
      StringOption​(java.lang.String key, java.lang.String defaultValue)  
    • Constructor Detail

      • StringOption

        public StringOption​(@NonNls @NotNull
                            java.lang.String key,
                            @NotNull
                            java.lang.String defaultValue)
        Parameters:
        key - name of the parameter. Used in equals and hashCode
        defaultValue - default value for this option, if not specified
    • Method Detail

      • fromString

        public java.lang.String 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<java.lang.String>
        Parameters:
        value - serialized option value Object.toString() method is used for serialization)
        Returns:
        deserialized value
      • toString

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