java.lang.Object
com.mrivanplays.annotationconfig.core.resolver.options.Option<T>
Type Parameters:
T - type

public final class Option<T> extends Object
Represents an option, which is holding a non-null value and information whether it can be replaced or not.
Since:
2.0.0
Author:
MrIvanPlays
  • Method Details

    • of

      public static <T> Option<T> of(T value)
      Creates a new Option instance.
      Type Parameters:
      T - type
      Parameters:
      value - a non-null value to be held by this option
      Returns:
      option instance
    • replaceable

      public boolean replaceable()
      Returns whether this option is replaceable in a CustomOptions context. By default, this will return a false boolean value.
      Returns:
      replaceable or not
    • markReplaceable

      Marks this option instance as replaceable.
      Returns:
      this instance for chaining
    • value

      public T value()
      Returns the value held by this option.
      Returns:
      value