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.Object
Holds used options (set or read) info.- Since:
- 09.08.2016
-
-
Constructor Summary
Constructors Constructor Description OptionHolder(Option<T> option)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description T
getValue()
boolean
isSet()
boolean
isUsed()
void
setValue(T value)
java.lang.String
toString()
-
-
-
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:
toString
in classjava.lang.Object
-
setValue
public void setValue(T value)
- Parameters:
value
- new option value
-
-