Package play.utils
Class Properties
- java.lang.Object
-
- java.util.AbstractMap<K,V>
-
- java.util.HashMap<java.lang.String,java.lang.String>
-
- play.utils.Properties
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Cloneable,java.util.Map<java.lang.String,java.lang.String>
public class Properties extends java.util.HashMap<java.lang.String,java.lang.String>like Properties, but with: encoding generic type helper- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description Properties()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Stringget(java.lang.String key, java.lang.String defaultValue)booleangetBoolean(java.lang.String key)booleangetBoolean(java.lang.String key, boolean defval)java.lang.ObjectgetClassInstance(java.lang.String key)java.lang.ObjectgetClassInstance(java.lang.String key, java.lang.Object defaultinstance)doublegetDouble(java.lang.String key)doublegetDouble(java.lang.String key, long defval)floatgetFloat(java.lang.String key)floatgetFloat(java.lang.String key, float defval)intgetInt(java.lang.String key)intgetInt(java.lang.String key, int defval)longgetLong(java.lang.String key)longgetLong(java.lang.String key, long defval)java.net.URLgetURL(java.lang.String key)voidload(java.io.InputStream is)voidload(java.io.InputStream is, java.lang.String encoding)voidsetDouble(java.lang.String key, double val)voidsetFloat(java.lang.String key, float val)voidsetInt(java.lang.String key, int val)voidsetLong(java.lang.String key, long val)voidstore(java.io.OutputStream out)voidstore(java.io.OutputStream out, java.lang.String encoding)-
Methods inherited from class java.util.HashMap
clear, clone, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, forEach, get, getOrDefault, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values
-
-
-
-
Method Detail
-
load
public void load(java.io.InputStream is) throws java.io.IOException- Throws:
java.io.IOException
-
load
public void load(java.io.InputStream is, java.lang.String encoding) throws java.io.IOException- Throws:
java.io.IOException
-
get
public java.lang.String get(java.lang.String key, java.lang.String defaultValue)
-
store
public void store(java.io.OutputStream out) throws java.io.IOException- Throws:
java.io.IOException
-
store
public void store(java.io.OutputStream out, java.lang.String encoding) throws java.io.IOException- Throws:
java.io.IOException
-
getBoolean
public boolean getBoolean(java.lang.String key) throws java.lang.IllegalArgumentException- Throws:
java.lang.IllegalArgumentException
-
getBoolean
public boolean getBoolean(java.lang.String key, boolean defval)
-
getClassInstance
public java.lang.Object getClassInstance(java.lang.String key) throws java.lang.IllegalArgumentException- Throws:
java.lang.IllegalArgumentException
-
getClassInstance
public java.lang.Object getClassInstance(java.lang.String key, java.lang.Object defaultinstance) throws java.lang.IllegalArgumentException- Throws:
java.lang.IllegalArgumentException
-
getDouble
public double getDouble(java.lang.String key) throws java.lang.IllegalArgumentException- Throws:
java.lang.IllegalArgumentException
-
getDouble
public double getDouble(java.lang.String key, long defval) throws java.lang.IllegalArgumentException- Throws:
java.lang.IllegalArgumentException
-
setDouble
public void setDouble(java.lang.String key, double val)
-
getFloat
public float getFloat(java.lang.String key) throws java.lang.IllegalArgumentException- Throws:
java.lang.IllegalArgumentException
-
getFloat
public float getFloat(java.lang.String key, float defval) throws java.lang.IllegalArgumentException- Throws:
java.lang.IllegalArgumentException
-
setFloat
public void setFloat(java.lang.String key, float val)
-
getInt
public int getInt(java.lang.String key) throws java.lang.IllegalArgumentException- Throws:
java.lang.IllegalArgumentException
-
getInt
public int getInt(java.lang.String key, int defval) throws java.lang.IllegalArgumentException- Throws:
java.lang.IllegalArgumentException
-
setInt
public void setInt(java.lang.String key, int val)
-
getLong
public long getLong(java.lang.String key) throws java.lang.IllegalArgumentException- Throws:
java.lang.IllegalArgumentException
-
getLong
public long getLong(java.lang.String key, long defval) throws java.lang.IllegalArgumentException- Throws:
java.lang.IllegalArgumentException
-
setLong
public void setLong(java.lang.String key, long val)
-
getURL
public java.net.URL getURL(java.lang.String key) throws java.lang.IllegalArgumentException- Throws:
java.lang.IllegalArgumentException
-
-