Package com.authlete.common.util
Class StringBasedTypedProperties
- java.lang.Object
-
- com.authlete.common.util.TypedProperties
-
- com.authlete.common.util.StringBasedTypedProperties
-
- Direct Known Subclasses:
PropertiesWrapper
public abstract class StringBasedTypedProperties extends TypedProperties
This is an abstract class that provides getters and setters for key-value pairs. Subclasses are required to implement the following abstract methods.voidTypedProperties.clear()booleancontains(String key)StringgetString(String key, String defaultValue)voidremove(String key)voidsetString(String key, String value)
Methods below which this class implements are just wrappers over
getString(String key, String defaultValue)orsetString(String key, String value).booleangetBoolean(String key, boolean defaultValue)floatgetFloat(String key, float defaultValue)intgetInt(String key, int defaultValue)longgetLong(String key, long defaultValue)voidsetBoolean(String key, boolean value)voidsetFloat(String key, float value)voidsetInt(String key, int value)voidsetLong(String key, long value)
- Author:
- Takahiko Kawasaki
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedStringBasedTypedProperties()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleangetBoolean(String key, boolean defaultValue)Get the value of the property identified by the key as boolean.floatgetFloat(String key, float defaultValue)Get the value of the property identified by the key as float.intgetInt(String key, int defaultValue)Get the value of the property identified by the key as int.longgetLong(String key, long defaultValue)Get the value of the property identified by the key as long.voidsetBoolean(String key, boolean value)Set the value to the property identified by the key.voidsetFloat(String key, float value)Set the value to the property identified by the key.voidsetInt(String key, int value)Set the value to the property identified by the key.voidsetLong(String key, long value)Set the value to the property identified by the key.-
Methods inherited from class com.authlete.common.util.TypedProperties
clear, contains, 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, getString, remove, remove, set, set, set, set, set, set, set, set, set, set, set, set, setBoolean, setEnum, setEnum, setFloat, setInt, setLong, setString, setString
-
-
-
-
Method Detail
-
getBoolean
public boolean getBoolean(String key, boolean defaultValue)
Description copied from class:TypedPropertiesGet the value of the property identified by the key as boolean. Ifkeyis null or there is no property for the key,defaultValueis returned.- Specified by:
getBooleanin classTypedProperties
-
getFloat
public float getFloat(String key, float defaultValue)
Description copied from class:TypedPropertiesGet the value of the property identified by the key as float. Ifkeyis null or there is no property for the key,defaultValueis returned.- Specified by:
getFloatin classTypedProperties
-
getInt
public int getInt(String key, int defaultValue)
Description copied from class:TypedPropertiesGet the value of the property identified by the key as int. Ifkeyis null or there is no property for the key,defaultValueis returned.- Specified by:
getIntin classTypedProperties
-
getLong
public long getLong(String key, long defaultValue)
Description copied from class:TypedPropertiesGet the value of the property identified by the key as long. Ifkeyis null or there is no property for the key,defaultValueis returned.- Specified by:
getLongin classTypedProperties
-
setBoolean
public void setBoolean(String key, boolean value)
Description copied from class:TypedPropertiesSet the value to the property identified by the key. Ifkeyis null, nothing is done.- Specified by:
setBooleanin classTypedProperties
-
setFloat
public void setFloat(String key, float value)
Description copied from class:TypedPropertiesSet the value to the property identified by the key. Ifkeyis null, nothing is done.- Specified by:
setFloatin classTypedProperties
-
setInt
public void setInt(String key, int value)
Description copied from class:TypedPropertiesSet the value to the property identified by the key. Ifkeyis null, nothing is done.- Specified by:
setIntin classTypedProperties
-
setLong
public void setLong(String key, long value)
Description copied from class:TypedPropertiesSet the value to the property identified by the key. Ifkeyis null, nothing is done.- Specified by:
setLongin classTypedProperties
-
-