|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Options
Options interface.
| Method Summary | ||
|---|---|---|
void |
addOption(String name,
Object option)
Set an option against the type. |
|
void |
addOptions(Map<String,?> map)
Add options. |
|
boolean |
getBooleanOption(String name)
Get boolean option. |
|
|
getOption(Class<T> expectedType)
Get option. |
|
Object |
getOption(String name)
Get an option from the type |
|
|
getOption(String name,
Class<T> expectedType)
Get the option. |
|
|
getOptions(Class<T> exactType)
Get all options that match type. |
|
void |
merge(Options other)
Merge options. |
|
void |
removeOption(String name)
Remove an option |
|
int |
size()
Get options size. |
|
| Method Detail |
|---|
int size()
void merge(Options other)
other - the other options<T> Map<String,T> getOptions(Class<T> exactType)
T - the exact typeexactType - the exact type
void addOption(String name,
Object option)
If you add a future object, subsequent gets will wait for the result
WARNING: Be careful about what you put in here. Don't create references across classloaders, if you are not sure add a WeakReference to the information.
name - the nameoption - the option, pass null to remove an option
IllegalArgumentException - for a null namevoid addOptions(Map<String,?> map)
map - the options map
IllegalArgumentException - for a null mapvoid removeOption(String name)
name - the name
IllegalArgumentException - for a null nameObject getOption(String name)
name - the name
<T> T getOption(Class<T> expectedType)
T - the expectedTypeexpectedType - the expected type.
<T> T getOption(String name,
Class<T> expectedType)
T - the expected typename - the nameexpectedType - the expected type
boolean getBooleanOption(String name)
name - the name
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||