public class JDFAttributeMap
extends java.util.HashMap<java.lang.String,java.lang.String>
| Constructor and Description |
|---|
JDFAttributeMap()
constructor
|
JDFAttributeMap(java.util.Map<java.lang.String,java.lang.String> inputMap)
Method JDFAttributeMap clone the content of the input map
|
JDFAttributeMap(java.lang.String key,
java.lang.String value)
utility constructor to construct a single value map
|
JDFAttributeMap(java.lang.String key,
org.apache.commons.lang.enums.ValuedEnum value)
utility constructor to construct a single value map
|
JDFAttributeMap(org.apache.commons.lang.enums.ValuedEnum partIDKey,
java.lang.String value)
constructor: create a new map with one entry that is defined by partIDKey, value
|
| Modifier and Type | Method and Description |
|---|---|
void |
andMap(JDFAttributeMap subMap)
andMap - builds a new map with identical pairs of both maps
|
JDFAttributeMap |
clone() |
boolean |
containsAny(VString keys) |
java.lang.String |
get(java.lang.Object key) |
JDFAttributeMap |
getAndMap(JDFAttributeMap subMap)
andMap - builds a new map with identical pairs of both maps does not modify this
|
boolean |
getBool(java.lang.Object key,
boolean def)
convenience boolean getter
|
double |
getDouble(java.lang.Object key,
double def)
convenience double getter
|
java.lang.String |
getIgnoreCase(java.lang.String strLocalName) |
int |
getInt(java.lang.Object key,
int def)
convenience int getter
|
java.util.Iterator<java.lang.String> |
getKeyIterator()
getKeyIterator - returns an iterator over the elements in this set.
|
StringArray |
getKeyList()
get the keys as a Vector,
|
VString |
getKeys()
Deprecated.
use getKeyList
|
java.lang.String |
getNonEmpty(java.lang.Object key)
get but always return null instead of empty string
|
JDFAttributeMap |
getOrMap(JDFAttributeMap subMap)
orMap - builds a new map with identical pairs of both maps does not modify this
|
static boolean |
isEmpty(JDFAttributeMap jdfAttributeMap) |
java.util.Enumeration<java.lang.String> |
keys()
Deprecated.
use keyset().iterator()
|
boolean |
matches(java.lang.String key,
java.lang.String regExp,
boolean ignoreCase)
checks whether this attributemap matches a regexp
|
JDFAttributeMap |
orMap(JDFAttributeMap subMap)
orMap - put all key/value pairs which are not in this map to this map.
|
boolean |
overlapMap(JDFAttributeMap subMap)
overlapMap - identical keys must have the same values in both maps i.e submap is either a superset or a subset of this
|
boolean |
overlapMap(VJDFAttributeMap vMap)
Method overlapMap.
|
boolean |
overlapsMap(java.util.Collection<JDFAttributeMap> vMap)
Method overlapMap.
|
java.lang.String |
put(java.lang.String key,
boolean value) |
java.lang.String |
put(java.lang.String key,
double value) |
java.lang.String |
put(java.lang.String key,
int value) |
java.lang.String |
put(java.lang.String key,
java.lang.String value)
put - maps the specified key to the specified value in this hashtable.
|
java.lang.String |
put(java.lang.String key,
org.apache.commons.lang.enums.ValuedEnum value) |
java.lang.String |
put(org.apache.commons.lang.enums.ValuedEnum key,
boolean value) |
java.lang.String |
put(org.apache.commons.lang.enums.ValuedEnum key,
double value) |
java.lang.String |
put(org.apache.commons.lang.enums.ValuedEnum key,
int value) |
java.lang.String |
put(org.apache.commons.lang.enums.ValuedEnum key,
java.lang.String value) |
java.lang.String |
put(org.apache.commons.lang.enums.ValuedEnum key,
org.apache.commons.lang.enums.ValuedEnum value) |
java.lang.String |
putNotNull(java.lang.Object key,
java.lang.Object value)
put - maps the specified key to the specified value in this hashtable.
|
JDFAttributeMap |
reduceMap(java.util.Collection<java.lang.String> keySet)
reduceKey - reduces the map, only valid map entries with the given key vector will be copied to the new hashtable; if null, clear this map
|
java.lang.String |
remove(java.lang.Object key)
remove - removes the key (and its corresponding value) from this hashtable.
This method does nothing if the key is not in the hashtable |
JDFAttributeMap |
removeKeys(java.util.Collection<java.lang.String> toRemove)
remove all keys defined by set from this
|
java.lang.String |
renameKey(java.lang.String oldKey,
java.lang.String newKey)
rename a key to the new value.
|
java.lang.String |
showKeys(java.lang.String sep)
showKeys - similar to toString but without class identifier
|
boolean |
subMap(JDFAttributeMap subMap)
subMap - returns true if map contains subMap, all keys of submap must be in this hashtable and they must have the same value
if subMap is null, the function returns true if subMap contains any wildcards, then the existance of the key in this defines a match |
boolean |
subMap(VJDFAttributeMap vMap)
Method subMap check if any of the maps in vMap are a subMap oft this (see subMap for details) if vMap is null, the function returns true
|
java.lang.String |
toString()
toString
|
clear, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, forEach, getOrDefault, isEmpty, keySet, merge, putAll, putIfAbsent, remove, replace, replace, replaceAll, size, valuespublic JDFAttributeMap()
public JDFAttributeMap(java.lang.String key,
java.lang.String value)
key - the key of the single value mapvalue - the value of the single value mappublic JDFAttributeMap(java.lang.String key,
org.apache.commons.lang.enums.ValuedEnum value)
key - the key of the single value mapvalue - the value of the single value mappublic JDFAttributeMap(java.util.Map<java.lang.String,java.lang.String> inputMap)
inputMap - map to clonepublic JDFAttributeMap(org.apache.commons.lang.enums.ValuedEnum partIDKey,
java.lang.String value)
partIDKey - the enumerated partIDKeyvalue - the partition key valuepublic java.lang.String showKeys(java.lang.String sep)
sep - the separator key between key-entry pairs@Deprecated public java.util.Enumeration<java.lang.String> keys()
JDFAttributeMappublic java.lang.String toString()
toString in class java.util.AbstractMap<java.lang.String,java.lang.String>public java.lang.String put(java.lang.String key,
java.lang.String value)
put in interface java.util.Map<java.lang.String,java.lang.String>put in class java.util.HashMap<java.lang.String,java.lang.String>key - unique key of the pair to add. Must not be "" or null.value - value of the pair to add. MAY be "" or null.NOTE: It is NOT possible to enter to identical keys. If you enter a key to a Attribute Map which already exists, the value will be replaced.
public java.lang.String putNotNull(java.lang.Object key,
java.lang.Object value)
key - unique key of the pair to add. Must not be "" or null.value - value of the pair to add. Must not be "" or null.NOTE: It is NOT possible to enter to identical keys. If you enter a key to a Attribute Map which already exists, the value will be replaced.
public boolean subMap(JDFAttributeMap subMap)
subMap - the map to comparepublic boolean subMap(VJDFAttributeMap vMap)
vMap - the vector submaps to check againstpublic boolean overlapMap(VJDFAttributeMap vMap)
vMap - the vector submaps to check againstpublic boolean overlapsMap(java.util.Collection<JDFAttributeMap> vMap)
vMap - the vector submaps to check againstpublic boolean matches(java.lang.String key,
java.lang.String regExp,
boolean ignoreCase)
key - the key to matchregExp - the simplified regexpignoreCase - duh...public boolean overlapMap(JDFAttributeMap subMap)
subMap - the map to compare with thispublic JDFAttributeMap orMap(JDFAttributeMap subMap)
subMap - the map to compare with thispublic void andMap(JDFAttributeMap subMap)
subMap - the given mappublic JDFAttributeMap getOrMap(JDFAttributeMap subMap)
subMap - the given mappublic JDFAttributeMap getAndMap(JDFAttributeMap subMap)
subMap - the given mappublic JDFAttributeMap reduceMap(java.util.Collection<java.lang.String> keySet)
keySet - the collection of given keyspublic java.lang.String remove(java.lang.Object key)
remove in interface java.util.Map<java.lang.String,java.lang.String>remove in class java.util.HashMap<java.lang.String,java.lang.String>public java.lang.String renameKey(java.lang.String oldKey,
java.lang.String newKey)
oldKey - newKey - public java.lang.String get(java.lang.Object key)
get in interface java.util.Map<java.lang.String,java.lang.String>get in class java.util.HashMap<java.lang.String,java.lang.String>Map.get(java.lang.Object)public boolean containsAny(VString keys)
keys - public java.lang.String getNonEmpty(java.lang.Object key)
public int getInt(java.lang.Object key,
int def)
key - def - public boolean getBool(java.lang.Object key,
boolean def)
key - def - public double getDouble(java.lang.Object key,
double def)
key - def - public java.lang.String put(org.apache.commons.lang.enums.ValuedEnum key,
java.lang.String value)
key - value - public java.lang.String put(java.lang.String key,
int value)
key - value - public java.lang.String put(org.apache.commons.lang.enums.ValuedEnum key,
int value)
key - value - public java.lang.String put(java.lang.String key,
double value)
key - value - public java.lang.String put(org.apache.commons.lang.enums.ValuedEnum key,
double value)
key - value - public java.lang.String put(java.lang.String key,
boolean value)
key - value - public java.lang.String put(org.apache.commons.lang.enums.ValuedEnum key,
boolean value)
key - value - public java.lang.String put(java.lang.String key,
org.apache.commons.lang.enums.ValuedEnum value)
key - value - public java.lang.String put(org.apache.commons.lang.enums.ValuedEnum key,
org.apache.commons.lang.enums.ValuedEnum value)
key - value - public java.util.Iterator<java.lang.String> getKeyIterator()
@Deprecated public VString getKeys()
public StringArray getKeyList()
public JDFAttributeMap removeKeys(java.util.Collection<java.lang.String> toRemove)
toRemove - the set of keys to removepublic JDFAttributeMap clone()
clone in class java.util.HashMap<java.lang.String,java.lang.String>Object.clone()public static boolean isEmpty(JDFAttributeMap jdfAttributeMap)
jdfAttributeMap - public java.lang.String getIgnoreCase(java.lang.String strLocalName)
strLocalName -