public class PropertiesMap extends Object implements Map<String,Object>
This class is a replacement for Properties class.
Please note that put(String,Object) has additional semantics.
| Constructor and Description |
|---|
PropertiesMap() |
PropertiesMap(InputStream is)
Creates a properties map from the stream.
|
PropertiesMap(int initialCapacity) |
PropertiesMap(Map<String,?> props) |
| Modifier and Type | Method and Description |
|---|---|
void |
clear() |
boolean |
containsKey(Object key) |
boolean |
containsValue(Object value) |
Set<Map.Entry<String,Object>> |
entrySet() |
boolean |
equals(Object o) |
Object |
get(Object key) |
int |
hashCode() |
boolean |
isEmpty() |
Set<String> |
keySet() |
void |
load(InputStream is)
Loads properties using
Properties.load(java.io.InputStream). |
Object |
put(String key,
Object value)
Put the property to underlying map.
|
void |
putAll(Map<? extends String,? extends Object> t) |
Object |
remove(Object key) |
int |
size() |
String |
toString() |
Collection<Object> |
values() |
public PropertiesMap()
public PropertiesMap(int initialCapacity)
public PropertiesMap(InputStream is) throws IOException
is - stream to load properties from.IOException - if I/O error occursload(java.io.InputStream)public boolean containsKey(Object key)
containsKey in interface Map<String,Object>public boolean containsValue(Object value)
containsValue in interface Map<String,Object>public Object put(String key, Object value)
The properties are immutable, i.e. if the property is already present in the map, the new value is ignored.
public boolean equals(Object o)
public int hashCode()
public void load(InputStream is) throws IOException
Properties.load(java.io.InputStream).
Properties order is preserved
is - input stream with properties.IOException - if I/O error occurs.Copyright © 2006-2012. All Rights Reserved.