Package com.authlete.common.util
Class PropertiesWrapper
- java.lang.Object
-
- com.authlete.common.util.TypedProperties
-
- com.authlete.common.util.StringBasedTypedProperties
-
- com.authlete.common.util.PropertiesWrapper
-
public class PropertiesWrapper extends StringBasedTypedProperties
Properties wrapper.- Author:
- Takahiko Kawasaki
-
-
Constructor Summary
Constructors Constructor Description PropertiesWrapper(Properties properties)
Constructor with aProperties
instance to be wrapped.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clear()
Clear all properties.boolean
contains(String key)
Check if the property identified by the key exists.String
getString(String key, String defaultValue)
Get the value of the property identified by the key as String.void
remove(String key)
Remove the property identified by the key.void
setString(String key, String value)
Set the value to the property identified by the key.-
Methods inherited from class com.authlete.common.util.StringBasedTypedProperties
getBoolean, getFloat, getInt, getLong, setBoolean, setFloat, setInt, setLong
-
Methods inherited from class com.authlete.common.util.TypedProperties
contains, get, get, get, get, get, get, get, get, get, get, get, get, get, get, get, get, getBoolean, getBoolean, getBoolean, getEnum, getEnum, getEnum, getEnum, getEnum, getEnum, getFloat, getFloat, getFloat, getInt, getInt, getInt, getLong, getLong, getLong, getString, getString, getString, remove, set, set, set, set, set, set, set, set, set, set, set, set, setBoolean, setEnum, setEnum, setFloat, setInt, setLong, setString
-
-
-
-
Constructor Detail
-
PropertiesWrapper
public PropertiesWrapper(Properties properties)
Constructor with aProperties
instance to be wrapped.- Parameters:
properties
-Properties
instance to be wrapped.- Throws:
IllegalArgumentException
-properties
isnull
.
-
-
Method Detail
-
contains
public boolean contains(String key)
Description copied from class:TypedProperties
Check if the property identified by the key exists.- Specified by:
contains
in classTypedProperties
-
getString
public String getString(String key, String defaultValue)
Description copied from class:TypedProperties
Get the value of the property identified by the key as String. Ifkey
is null or there is no property for the key,defaultValue
is returned.- Specified by:
getString
in classTypedProperties
-
setString
public void setString(String key, String value)
Description copied from class:TypedProperties
Set the value to the property identified by the key. Ifkey
is null, nothing is done.- Specified by:
setString
in classTypedProperties
-
remove
public void remove(String key)
Description copied from class:TypedProperties
Remove the property identified by the key. Ifkey
is null, nothing is done.- Specified by:
remove
in classTypedProperties
-
clear
public void clear()
Description copied from class:TypedProperties
Clear all properties.- Specified by:
clear
in classTypedProperties
-
-