java.lang.Object
ru.vyarus.dropwizard.guice.module.context.option.internal.OptionHolder<T>
Type Parameters:
T - option value type (actually not used due to enums, but stayed to indicate option and value type connection)

public final class OptionHolder<T> extends Object
Holds used options (set or read) info.
Since:
09.08.2016
  • Constructor Details

    • OptionHolder

      public OptionHolder(Option<T> option)
      Create holder.
      Parameters:
      option - option
  • Method Details

    • isUsed

      public boolean isUsed()
      Returns:
      true if option value was read, false otherwise
    • isSet

      public boolean isSet()
      Returns:
      true if custom option value was set, false otherwise
    • getValue

      public T getValue()
      Returns:
      option value (default of set)
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • setValue

      public void setValue(T value)
      Parameters:
      value - new option value