- java.lang.Object
-
- com.appslandia.common.base.MapWrapper<String,String>
-
- com.appslandia.common.base.ConfigMap
-
- com.appslandia.common.base.PropertyConfig
-
- All Implemented Interfaces:
Config,Serializable,Map<String,String>
- Direct Known Subclasses:
SecureConfig
public class PropertyConfig extends ConfigMap implements Serializable
- Author:
- Loc Ha
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class com.appslandia.common.base.MapWrapper
map
-
-
Constructor Summary
Constructors Constructor Description PropertyConfig()PropertyConfig(Map<String,String> newMap)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidfromProperties(Properties props)PropertyConfigload(File file)PropertyConfigload(InputStream is)PropertyConfigload(Reader r)PropertyConfigload(String file)PropertyConfigset(String key, boolean value)PropertyConfigset(String key, double value)PropertyConfigset(String key, int value)PropertyConfigset(String key, long value)PropertyConfigset(String key, String value)voidstore(File file, String comments)voidstore(OutputStream os, String comments)voidstore(Writer w, String comments)voidstore(String file, String comments)protected PropertiestoProperties()StringtoString()-
Methods inherited from class com.appslandia.common.base.MapWrapper
clear, containsKey, containsValue, entrySet, isEmpty, keySet, remove, size, values
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.appslandia.common.base.Config
getBool, getDouble, getFormatted, getFormatted, getFormatted, getInt, getLong, getRequiredBool, getRequiredDouble, getRequiredFormatted, getRequiredFormatted, getRequiredFormatted, getRequiredInt, getRequiredLong, getRequiredString, getString, getStringArray
-
Methods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, equals, forEach, getOrDefault, hashCode, merge, putIfAbsent, remove, replace, replace, replaceAll
-
-
-
-
Method Detail
-
load
public PropertyConfig load(InputStream is) throws IOException
- Throws:
IOException
-
load
public PropertyConfig load(Reader r) throws IOException
- Throws:
IOException
-
load
public PropertyConfig load(File file) throws IOException
- Throws:
IOException
-
load
public PropertyConfig load(String file) throws IOException
- Throws:
IOException
-
fromProperties
protected void fromProperties(Properties props)
-
store
public void store(File file, String comments) throws IOException
- Throws:
IOException
-
store
public void store(String file, String comments) throws IOException
- Throws:
IOException
-
store
public void store(OutputStream os, String comments) throws IOException
- Throws:
IOException
-
store
public void store(Writer w, String comments) throws IOException
- Throws:
IOException
-
toProperties
protected Properties toProperties()
-
set
public PropertyConfig set(String key, String value)
-
set
public PropertyConfig set(String key, boolean value)
-
set
public PropertyConfig set(String key, int value)
-
set
public PropertyConfig set(String key, long value)
-
set
public PropertyConfig set(String key, double value)
-
-