Class OptionHolder<T>
- 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 java.lang.ObjectHolds used options (set or read) info.- Since:
- 09.08.2016
-
-
Constructor Summary
Constructors Constructor Description OptionHolder(Option<T> option)Create holder.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TgetValue()booleanisSet()booleanisUsed()voidsetValue(T value)java.lang.StringtoString()
-
-
-
Method Detail
-
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 java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
setValue
public void setValue(T value)
- Parameters:
value- new option value
-
-