T - public final class ImmutableOptionRegistry<T extends Option<T>> extends java.lang.Object implements OptionRegistry<T>
of(Collection) to create a new instance.
This class is immutable
| Modifier and Type | Method and Description |
|---|---|
<T1 extends T> |
get(java.lang.Class<T1> optionType)
Has to return the option with the given marker interface
|
static <T extends Option<T>> |
of(java.util.Collection<T> processingOptions)
creates a new registry which will contain the given options.
|
<T1 extends T> |
with(T1 newOption)
Has to return a new instance of an option registry, containing the same options, except the given one replacing
the previously contained option with the same marker interface.
|
public static <T extends Option<T>> ImmutableOptionRegistry<T> of(java.util.Collection<T> processingOptions)
processingOptions - the options that will be contained in the registrypublic <T1 extends T> T1 get(java.lang.Class<T1> optionType)
OptionRegistryget in interface OptionRegistry<T extends Option<T>>optionType - the class of the marker interface for which an instance has to be retrievedpublic <T1 extends T> OptionRegistry<T> with(T1 newOption)
OptionRegistrywith in interface OptionRegistry<T extends Option<T>>newOption - the new option to replace the previously contained with the same marker interface