Class CleanUpOptionsCore
- java.lang.Object
-
- org.eclipse.jdt.core.manipulation.CleanUpOptionsCore
-
- Direct Known Subclasses:
CleanUpOptions
public class CleanUpOptionsCore extends Object
Allows to set and retrieve clean up settings for given options keys.- Since:
- 1.12 This class is not intended to be subclassed by clients.
-
-
Constructor Summary
Constructors Constructor Description CleanUpOptionsCore()
Creates a new instance.CleanUpOptionsCore(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
-
CleanUpOptionsCore
public CleanUpOptionsCore(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
-
CleanUpOptionsCore
public CleanUpOptionsCore()
Creates a new instance.
-
-
Method Detail
-
isEnabled
public boolean isEnabled(String key)
Tells whether the option with the givenkey
is enabled.- Parameters:
key
- the name of the option- Returns:
true
if enabled,false
if not enabled or unknown key- Throws:
IllegalArgumentException
- if the key isnull
- See Also:
CleanUpConstants
-
getValue
public String getValue(String key)
Returns the value for the given key.- Parameters:
key
- the key of the value- Returns:
- the value associated with the key
- Throws:
IllegalArgumentException
- if the key is null or unknown
-
setOption
public void setOption(String key, String value)
Sets the option for the given key to the given value.- Parameters:
key
- the name of the option to setvalue
- the value of the option- Throws:
IllegalArgumentException
- if the key isnull
- See Also:
TRUE
,FALSE
-
-