Package cc.carm.lib.easyoptions
Interface OptionHolder
-
public interface OptionHolder
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default <V> Vclear(@NotNull OptionType<V> type)Set the value of option to option'sOptionType.defaults().static OptionHoldercreateOptionHolder()static OptionHoldercreateOptionHolder(@NotNull java.util.Map<OptionType<?>,java.lang.Object> options)default <V> Vget(@NotNull OptionType<V> type)Get the value of option.@NotNull java.util.Map<OptionType<?>,java.lang.Object>options()default <V> Vset(@NotNull OptionType<V> type, V value)Set the value of option.
-
-
-
Method Detail
-
createOptionHolder
static OptionHolder createOptionHolder()
-
createOptionHolder
static OptionHolder createOptionHolder(@NotNull @NotNull java.util.Map<OptionType<?>,java.lang.Object> options)
-
options
@NotNull @NotNull java.util.Map<OptionType<?>,java.lang.Object> options()
-
get
@NotNull default <V> V get(@NotNull @NotNull OptionType<V> type)Get the value of option.- Type Parameters:
V- Value type- Parameters:
type-OptionType- Returns:
- Value of option
-
set
@Nullable default <V> V set(@NotNull @NotNull OptionType<V> type, @Nullable V value)Set the value of option.- Type Parameters:
V- Value type- Parameters:
type-OptionTypevalue- Value of option- Returns:
- Previous value of option
-
clear
@Nullable default <V> V clear(@NotNull @NotNull OptionType<V> type)Set the value of option to option'sOptionType.defaults().- Type Parameters:
V- Value type- Parameters:
type-OptionType- Returns:
- Previous value of option
-
-