public class OptionsMap extends TreeMap<Object,Object>
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>
Constructor and Description |
---|
OptionsMap() |
Modifier and Type | Method and Description |
---|---|
Boolean |
getBoolean(Object key)
If the object stored under key is a Boolean then returns its value
otherwise returns false.
|
Boolean |
getBoolean(Object key,
Boolean defaultValue) |
Double |
getDouble(Object key)
If the object stored under key is an Double then returns its value
otherwise returns null.
|
File |
getFile(Object key) |
Font |
getFont(Object key)
If the object stored under key is a Font then returns its value
otherwise returns null.
|
Integer |
getInt(Object key)
If the object stored under key is an Integer then returns its value
otherwise returns null.
|
Integer |
getInt(Object key,
Integer defaultValue) |
Map<String,String> |
getMap(Object key)
If the object stored under key is a map then returns its value
otherwise returns an empty map.
|
LinkedHashSet<String> |
getSet(Object key)
If the object stored under key is a set then returns its value
otherwise returns an empty set.
|
String |
getString(Object key)
If the object stored under key is a String then returns its value
otherwise returns null.
|
Map<String,String> |
getStringMap()
Returns a String based view of the data.
|
Object |
put(Object key,
LinkedHashSet<String> value) |
Object |
put(Object key,
Map<String,String> value) |
Object |
put(Object key,
Object value)
Converts the value to string using
Strings.toString(Object)
method and then stores it. |
ceilingEntry, ceilingKey, clear, clone, comparator, containsKey, containsValue, descendingKeySet, descendingMap, entrySet, firstEntry, firstKey, floorEntry, floorKey, get, headMap, headMap, higherEntry, higherKey, keySet, lastEntry, lastKey, lowerEntry, lowerKey, navigableKeySet, pollFirstEntry, pollLastEntry, putAll, remove, size, subMap, subMap, tailMap, tailMap, values
equals, hashCode, isEmpty, toString
public OptionsMap()
public Object put(Object key, Object value)
Strings.toString(Object)
method and then stores it.
There is get methods for values that are a String, an Integer, a Boolean,
a Font, a List of String and a Map of String*String.public Object put(Object key, LinkedHashSet<String> value)
public Integer getInt(Object key)
key
- key associated to the value to retrievepublic Double getDouble(Object key)
key
- key associated to the value to retrievepublic Boolean getBoolean(Object key)
key
- key associated to the value to retrievepublic Boolean getBoolean(Object key, Boolean defaultValue)
public String getString(Object key)
key
- key associated to the value to retrievepublic Font getFont(Object key)
key
- key associated to the value to retrievepublic LinkedHashSet<String> getSet(Object key)
key
- key associated to the value to retrievepublic Map<String,String> getMap(Object key)
key
- key associated to the value to retrievepublic Map<String,String> getStringMap()