Package cc.carm.lib.easyoptions
Class OptionType<V>
- java.lang.Object
-
- cc.carm.lib.easyoptions.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()
-
-
-
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)
-
-