## org.eclipse.ocl.options
Interface Customizable

All Known Subinterfaces:
  BasicEnvironment, BasicEnvironment2, Environment.Internal<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E>

All Known Implementing Classes:
  AbstractBasicEnvironment, AbstractEnvironment, AbstractEvaluationEnvironment, EcoreEnvironment, EcoreEvaluationEnvironment, UMLEnvironment, UMLEvaluationEnvironment

    public interface Customizable

An optional adapter interface for entities whose behaviour can be customized by clients by the application of `Option`s. The primary customizable entities are parsing `Environment`s and `EvaluationEnvironment`s.

Since:
  1.2

Method Summary
`Map<Option<?>,Object>` `clearOptions()` Clears all options.
`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> options)`
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>> options)`
Removes the specified options.

`

`<T> void`

`

`setOption(Option<T> option, T value)`
Add an option to apply to my behaviour.

Method Detail

### getOptions

    Map<Option<?>,Object> getOptions()

  Obtains a copy of my map of options. Options not explicitly set in an environment are inherited from the parent environment, if any, otherwise they are at their default values.

  Returns:
    the map of options

### getValue

    <T> T getValue(Option<T> option)

  Obtains the value of the specified option's setting in the my options map. Options not explicitly set in an environment are inherited from the parent environment, if any, otherwise they are at their default values.

  Parameters:
    `option` - the option to query
  Returns:
    value of the option

### isEnabled

    boolean isEnabled(Option<Boolean> option)

  Queries whether the specified boolean-valued option is enabled. This method essentially just puts a nice "is" name on boolean options. Options not explicitly set in an environment are inherited from the parent environment, if any, otherwise they are at their default values.

  Parameters:
    `option` - an option
  Returns:
    whether the option is enabled

### setOption

    <T> void setOption(Option<T> option,
                       T value)

  Add an option to apply to my behaviour.

  Parameters:
    `option` - the option
    `value` - the option's value

### putOptions

    <T> void putOptions(Map<? extends Option<T>,? extends T> options)

  Adds options to apply to my behaviour.

  Parameters:
    `options` - the options

### removeOption

    <T> T removeOption(Option<T> option)

  Removes the specified option.

  Parameters:
    `option` - the option to remove
  Returns:
    the former value of the option

### removeOptions

    <T> Map<Option<T>,T> removeOptions(Collection<Option<T>> options)

  Removes the specified options.

  Parameters:
    `options` - the options to remove
  Returns:
    the former values of the options

### clearOptions

    Map<Option<?>,Object> clearOptions()

  Clears all options.

  Returns:
    the former values of the options

Copyright 2002, 2007 IBM Corporation and others. All Rights Reserved.