|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eclipse.ocl.examples.pivot.AbstractBasicEnvironment<P>
public abstract class AbstractBasicEnvironment<P extends BasicEnvironment>
Partial implementation of the BasicEnvironment interface, providing
default behaviours for most features.
| Field Summary | |
|---|---|
protected P |
parent
|
| Constructor Summary | |
|---|---|
protected |
AbstractBasicEnvironment(P parent)
Initializes me with the specified parent environment. |
| Method Summary | ||
|---|---|---|
protected java.util.Map<Option<?>,java.lang.Object> |
basicGetOptions()
|
|
java.util.Map<Option<?>,java.lang.Object> |
clearOptions()
Clears all options. |
|
|
getAdapter(java.lang.Class<T> adapterType)
Implements the interface method by testing whether I am an instance of the requested adapter type. |
|
java.util.Map<Option<?>,java.lang.Object> |
getOptions()
Obtains a copy of my map of options. |
|
P |
getParent()
|
|
|
getValue(Option<T> option)
Obtains the value of the specified option's setting in the my options map. |
|
boolean |
isEnabled(Option<java.lang.Boolean> option)
Queries whether the specified boolean-valued option is enabled. |
|
boolean |
notOK(Option<ProblemHandler.Severity> option)
Queries whether I have a non-OK setting for the specified problem option. |
|
|
putOptions(java.util.Map<? extends Option<T>,? extends T> newOptions)
Adds options to apply to my behaviour. |
|
|
removeOption(Option<T> option)
Removes the specified option. |
|
|
removeOptions(java.util.Collection<Option<T>> unwantedOptions)
Removes the specified options. |
|
|
setOption(Option<T> option,
T value)
Add an option to apply to my behaviour. |
|
protected void |
setParent(P parent)
Assigns me a parent environment after construction. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
@Nullable protected P extends BasicEnvironment parent
| Constructor Detail |
|---|
protected AbstractBasicEnvironment(P parent)
parent - an environment (or null)| Method Detail |
|---|
@NonNull protected final java.util.Map<Option<?>,java.lang.Object> basicGetOptions()
@NonNull public java.util.Map<Option<?>,java.lang.Object> clearOptions()
Customizable
clearOptions in interface Customizablepublic <T> T getAdapter(java.lang.Class<T> adapterType)
getAdapter in interface AdaptableT - the requested adapter interfaceadapterType - the requested adapter interface
null
if this environment does not adapt to itpublic java.util.Map<Option<?>,java.lang.Object> getOptions()
Customizable
getOptions in interface Customizablepublic final P getParent()
@Nullable
public <T> T getValue(@NonNull
Option<T> option)
Customizable
getValue in interface Customizableoption - the option to query
public boolean isEnabled(@NonNull
Option<java.lang.Boolean> option)
Customizable
isEnabled in interface Customizableoption - an option
public boolean notOK(@NonNull
Option<ProblemHandler.Severity> option)
option - the problem option
ProblemHandler.Severity.OK
public <T> void putOptions(@NonNull
java.util.Map<? extends Option<T>,? extends T> newOptions)
Customizable
putOptions in interface CustomizablenewOptions - the options
@Nullable
public <T> T removeOption(@NonNull
Option<T> option)
Customizable
removeOption in interface Customizableoption - the option to remove
@NonNull
public <T> java.util.Map<Option<T>,T> removeOptions(@NonNull
java.util.Collection<Option<T>> unwantedOptions)
Customizable
removeOptions in interface CustomizableunwantedOptions - the options to remove
public <T> void setOption(@NonNull
Option<T> option,
@Nullable
T value)
Customizable
setOption in interface Customizableoption - the optionvalue - the option's valueprotected void setParent(P parent)
null if I previously had one.
parent - my new parent
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||