public abstract class AbstractCustomizable extends Object implements Adaptable, Customizable
Adaptable and Customizable interfaces,
providing some useful common behaviors. Implementors of metamodel-specific
environments are encourage to extend this class rather than implement
an evaluation environment "from scratch."
| Constructor and Description |
|---|
AbstractCustomizable() |
| Modifier and Type | Method and Description |
|---|---|
Map<Option<?>,Object> |
clearOptions()
Clears all options.
|
<T> T |
getAdapter(Class<T> adapterType)
Implements the interface method by testing whether I am an instance of
the requested adapter type.
|
Map<Option<?>,Object> |
getOptions()
Obtains a copy of my map of options.
|
<T> T |
getValue(Option<T> option)
Obtains the value of the specified option's setting in the my
options map.
|
boolean |
isEnabled(Option<Boolean> option)
Queries whether the specified boolean-valued option is enabled.
|
<T> void |
putOptions(Map<? extends Option<T>,? extends T> newOptions)
Adds options to apply to my behaviour.
|
<T> T |
removeOption(Option<T> option)
Removes the specified option.
|
<T> Map<Option<T>,T> |
removeOptions(Collection<Option<T>> unwantedOptions)
Removes the specified options.
|
<T> void |
setOption(Option<T> option,
T value)
Add an option to apply to my behaviour.
|
public Map<Option<?>,Object> clearOptions()
CustomizableclearOptions in interface Customizablepublic <T> T getAdapter(Class<T> adapterType)
getAdapter in interface AdaptableT - the requested adapter interfaceadapterType - the requested adapter interfacenull
if this environment does not adapt to itpublic Map<Option<?>,Object> getOptions()
CustomizablegetOptions in interface Customizablepublic <T> T getValue(Option<T> option)
CustomizablegetValue in interface Customizableoption - the option to querypublic boolean isEnabled(Option<Boolean> option)
CustomizableisEnabled in interface Customizableoption - an optionpublic <T> void putOptions(Map<? extends Option<T>,? extends T> newOptions)
CustomizableputOptions in interface CustomizablenewOptions - the optionspublic <T> T removeOption(Option<T> option)
CustomizableremoveOption in interface Customizableoption - the option to removepublic <T> Map<Option<T>,T> removeOptions(Collection<Option<T>> unwantedOptions)
CustomizableremoveOptions in interface CustomizableunwantedOptions - the options to removepublic <T> void setOption(Option<T> option, T value)
CustomizablesetOption in interface Customizableoption - the optionvalue - the option's valueCopyright © 2005, 2018 IBM Corporation and others. All Rights Reserved.