public class WMSProperties
extends java.util.HashMap
WMSProperties: generic properties container used by many class to store extended property information. Acts like a simple Map with some simple utilities for performing type conversion.
| Constructor | Description |
|---|---|
WMSProperties() |
| Modifier and Type | Method | Description |
|---|---|---|
static void |
cloneProperties(WMSProperties from,
WMSProperties to) |
Copy all properties from "from" properties object to "to" properties object.
|
String[] |
getAllAsStrings() |
Return all properties as String[].
|
java.util.Map<String,String> |
getMatchingEntries(String prefix,
java.util.ArrayList<String> types) |
|
Object |
getProperty(String name) |
Get property value as generic object.
|
boolean |
getPropertyBoolean(String name,
boolean defaultVal) |
Get property as boolean, return default value if does not exist.
|
double |
getPropertyDouble(String name,
double defaultVal) |
Get property as double, return default value if does not exist.
|
int |
getPropertyInt(String name,
int defaultVal) |
Get property as int, return default value if does not exist.
|
long |
getPropertyLong(String name,
long defaultVal) |
Get property as long, return default value if does not exist.
|
String |
getPropertyStr(String name) |
Get property as String
|
String |
getPropertyStr(String name,
String defaultVal) |
Get property as String, return default value if does not exist.
|
void |
loadFromProperties(java.util.Properties props) |
|
void |
putAll(java.util.Map m) |
|
void |
setProperty(String name,
Object value) |
Set property to generic object.
|
String |
toJSON() |
|
String |
toString() |
clear, clone, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, forEach, get, getOrDefault, isEmpty, keySet, merge, put, putIfAbsent, remove, remove, replace, replace, replaceAll, size, valuespublic static void cloneProperties(WMSProperties from, WMSProperties to)
from - source propertiesto - destination propertiespublic String[] getAllAsStrings()
public java.util.Map<String,String> getMatchingEntries(String prefix,
java.util.ArrayList<String> types)
public Object getProperty(String name)
name - property namepublic boolean getPropertyBoolean(String name,
boolean defaultVal)
name - property namedefaultVal - default valuepublic double getPropertyDouble(String name,
double defaultVal)
name - property namedefaultVal - default valuepublic int getPropertyInt(String name,
int defaultVal)
name - property namedefaultVal - default valuepublic long getPropertyLong(String name,
long defaultVal)
name - property namedefaultVal - default valuepublic String getPropertyStr(String name)
name - property namepublic String getPropertyStr(String name,
String defaultVal)
name - property namedefaultVal - default valuepublic void loadFromProperties(java.util.Properties props)
public void putAll(java.util.Map m)
putAll in class java.util.HashMappublic void setProperty(String name,
Object value)
name - property namevalue - valuepublic String toJSON()
public String toString()
toString in class java.util.AbstractMap