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 aPropertiesinstance to be wrapped.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclear()Clear all properties.booleancontains(String key)Check if the property identified by the key exists.StringgetString(String key, String defaultValue)Get the value of the property identified by the key as String.voidremove(String key)Remove the property identified by the key.voidsetString(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 aPropertiesinstance to be wrapped.- Parameters:
properties-Propertiesinstance to be wrapped.- Throws:
IllegalArgumentException-propertiesisnull.
-
-
Method Detail
-
contains
public boolean contains(String key)
Description copied from class:TypedPropertiesCheck if the property identified by the key exists.- Specified by:
containsin classTypedProperties
-
getString
public String getString(String key, String defaultValue)
Description copied from class:TypedPropertiesGet the value of the property identified by the key as String. Ifkeyis null or there is no property for the key,defaultValueis returned.- Specified by:
getStringin classTypedProperties
-
setString
public void setString(String key, String value)
Description copied from class:TypedPropertiesSet the value to the property identified by the key. Ifkeyis null, nothing is done.- Specified by:
setStringin classTypedProperties
-
remove
public void remove(String key)
Description copied from class:TypedPropertiesRemove the property identified by the key. Ifkeyis null, nothing is done.- Specified by:
removein classTypedProperties
-
clear
public void clear()
Description copied from class:TypedPropertiesClear all properties.- Specified by:
clearin classTypedProperties
-
-