Interface OptionHolder


  • public interface OptionHolder
    • 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 - OptionType
        value - 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's OptionType.defaults().
        Type Parameters:
        V - Value type
        Parameters:
        type - OptionType
        Returns:
        Previous value of option