se.jbee.inject.config
Class Presets
Object
se.jbee.inject.config.Presets
public final class Presets
- extends Object
Presets are an immutable associative data structure associating a exact Type
(including generics) with a value for/of that exact given type. These values act as input
parameters to the bootstrapping process. The values are used within modules that depend on
data that is given as program input.
- Author:
- Jan Bernitt (jan@jbee.se)
| Methods inherited from class Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
EMPTY
public static final Presets EMPTY
preset
public <T> Presets preset(Class<T> type,
T value)
- See Also:
preset(Type, Object)
preset
public <T> Presets preset(Type<T> type,
T value)
- Returns:
- new
Presets instance with the given key-value association. Any existing
association of the same key will be overridden.
value
public <T> T value(Type<T> type)
- Returns:
- The value associated with the given exact
Type or null of no
value is associated with it.
toString
public String toString()
- Overrides:
toString in class Object