Class OptionType<V>


  • public class OptionType<V>
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor Description
      OptionType​(@NotNull java.lang.Class<V> valueClazz, V defaultValue)  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      V defaults()  
      void defaults​(V defaultValue)
      Set the default value of option.
      boolean isDefault​(V value)  
      static <T> OptionType<T> of​(@NotNull java.lang.Class<T> valueClazz, T defaultValue)  
      static <T> OptionType<T> of​(T defaultValue)  
      @NotNull java.lang.Class<V> valueClass()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • OptionType

        public OptionType​(@NotNull
                          @NotNull java.lang.Class<V> valueClazz,
                          @NotNull
                          V defaultValue)
    • Method Detail

      • of

        public static <T> OptionType<T> of​(@NotNull
                                           T defaultValue)
      • of

        public static <T> OptionType<T> of​(@NotNull
                                           @NotNull java.lang.Class<T> valueClazz,
                                           @NotNull
                                           T defaultValue)
      • valueClass

        @NotNull
        public @NotNull java.lang.Class<V> valueClass()
      • defaults

        @NotNull
        public V defaults()
      • defaults

        public void defaults​(@NotNull
                             V defaultValue)
        Set the default value of option.
        Parameters:
        defaultValue - Default value
      • isDefault

        public boolean isDefault​(@NotNull
                                 V value)