Package org.eclipse.jdt.ui.cleanup
Class CleanUpOptions
- java.lang.Object
-
- org.eclipse.jdt.core.manipulation.CleanUpOptionsCore
-
- org.eclipse.jdt.ui.cleanup.CleanUpOptions
-
public class CleanUpOptions extends CleanUpOptionsCore
Allows to set and retrieve clean up settings for given options keys.- Since:
- 3.5
- Restriction:
- This class is not intended to be subclassed by clients.
-
-
Constructor Summary
Constructors Modifier Constructor Description CleanUpOptions()
Creates a new instance.protected
CleanUpOptions(Map<String,String> options)
Creates a new CleanUpOptions instance with the given options.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Set<String>
getKeys()
Returns an unmodifiable set of all known keys.String
getValue(String key)
Returns the value for the given key.boolean
isEnabled(String key)
Tells whether the option with the givenkey
is enabled.void
setOption(String key, String value)
Sets the option for the given key to the given value.
-
-
-
Field Detail
-
TRUE
public static final String TRUE
True value- See Also:
- Constant Field Values
-
FALSE
public static final String FALSE
False value- See Also:
- Constant Field Values
-
-
Constructor Detail
-
CleanUpOptions
protected CleanUpOptions(Map<String,String> options)
Creates a new CleanUpOptions instance with the given options.- Parameters:
options
- map that maps clean ups keys (String
) to a non-null
string value
-
CleanUpOptions
public CleanUpOptions()
Creates a new instance.
-
-
Method Detail
-
getKeys
public Set<String> getKeys()
Description copied from class:CleanUpOptionsCore
Returns an unmodifiable set of all known keys.- Overrides:
getKeys
in classCleanUpOptionsCore
- Returns:
- an unmodifiable set of all keys
-
setOption
public void setOption(String key, String value)
Description copied from class:CleanUpOptionsCore
Sets the option for the given key to the given value.- Overrides:
setOption
in classCleanUpOptionsCore
- Parameters:
key
- the name of the option to setvalue
- the value of the option- See Also:
CleanUpOptionsCore.TRUE
,CleanUpOptionsCore.FALSE
-
getValue
public String getValue(String key)
Description copied from class:CleanUpOptionsCore
Returns the value for the given key.- Overrides:
getValue
in classCleanUpOptionsCore
- Parameters:
key
- the key of the value- Returns:
- the value associated with the key
-
isEnabled
public boolean isEnabled(String key)
Description copied from class:CleanUpOptionsCore
Tells whether the option with the givenkey
is enabled.- Overrides:
isEnabled
in classCleanUpOptionsCore
- Parameters:
key
- the name of the option- Returns:
true
if enabled,false
if not enabled or unknown key- See Also:
CleanUpConstants
-
-