public class JDFAttributeMapArray extends java.util.ArrayList<JDFAttributeMap>
| Constructor and Description |
|---|
JDFAttributeMapArray()
constructor
|
JDFAttributeMapArray(java.util.Collection<JDFAttributeMap> toAdd)
copy constructor, the map elements are cloned
|
JDFAttributeMapArray(JDFAttributeMap moreMap) |
JDFAttributeMapArray(JDFAttributeMap[] toAdd)
constructor from array, the map elements are not cloned
|
| Modifier and Type | Method and Description |
|---|---|
void |
appendUnique(JDFAttributeMap map) |
void |
appendUnique(JDFAttributeMapArray maps)
Method appendUnique.
|
JDFAttributeMapArray |
clone() |
boolean |
containsKey(java.lang.String key) |
boolean |
equals(java.lang.Object other)
equals - Compares two map vectors, returns true if content equal regardless of element order, otherwise false.
If input is not of type VJDFAttributeMap, result of superclasses equals method is returned. |
JDFAttributeMap |
get(int i)
Returns the element at the given position (may be<0 to count backwards)
|
JDFAttributeMapArray |
getAndMaps(JDFAttributeMap map)
andMap - builds a new vector of maps with identical pairs of both maps does not modify this
|
static JDFAttributeMapArray |
getArray(JDFAttributeMap partMap) |
JDFAttributeMap |
getCommonMap()
return the map that is common to all elements of this.
|
StringArray |
getKeys()
return list of all keys
|
JDFAttributeMapArray |
getMatchingMaps(java.lang.String key,
java.lang.String regExp,
boolean ignoreCase)
Method overlapMap.
|
static JDFAttributeMapArray |
getNonEmpty(JDFAttributeMapArray v) |
JDFAttributeMapArray |
getOrMaps(JDFAttributeMap map)
andMap - builds a new vector of maps with identical pairs of both maps does not modify this
|
JDFAttributeMapArray |
getOrMaps(JDFAttributeMapArray vMap)
andMap - builds a new vector of maps with identical pairs of both maps does not modify this
|
JDFAttributeMapArray |
getOverlapMaps(JDFAttributeMap map)
Method overlapMap.
|
java.util.List<java.lang.String> |
getPartValues(java.lang.String strKey,
boolean bUnique) |
int |
hashCode()
hashCode complements equals() to fulfill the equals/hashCode contract
|
static boolean |
isEmpty(java.util.Collection<JDFAttributeMap> v)
are we null or empty or contain only an empty JDFAttributeMap
|
int |
maxSize()
Return the maximum size size of a JDFAttributeMap in this
|
int |
minSize()
Return the minimum size size of a JDFAttributeMap in this
|
JDFAttributeMapArray |
overlapMap(JDFAttributeMap map)
Method overlapMap.
|
JDFAttributeMapArray |
overlapMap(JDFAttributeMapArray vMap)
Method overlapMap.
|
boolean |
overlapsMap(JDFAttributeMap map)
Method overlapMap.
|
boolean |
overlapsMap(JDFAttributeMapArray vMap)
Method overlapsMap.
|
void |
put(JDFAttributeMap commonMap)
put the value of all keys into every existing map
|
void |
put(java.lang.Object key,
java.lang.Object value)
put the key value pair into all entries
|
void |
put(java.lang.String key,
java.lang.String value)
put the key value pair into all entries; if no entries are there, create exactly one entry with the given key value pair
|
void |
reduceMap(java.util.Collection<java.lang.String> keySet)
reduce each JDFAttributeMap in
this by keySet (only entries in keyset are retained) |
JDFAttributeMapArray |
removeKey(java.lang.String key)
remove the key specified and then erase any duplicates and emptys
|
JDFAttributeMapArray |
removeKeys(java.util.Collection<java.lang.String> set)
remove the keys specified in set and then erase any duplicates and emptys
|
void |
removeMaps(JDFAttributeMap map)
remove all matching maps from this i.e.
|
java.lang.String |
showKeys(java.lang.String sepMap,
java.lang.String sepEntry) |
boolean |
subMap(JDFAttributeMap map)
Method subMap.
|
boolean |
subMap(JDFAttributeMapArray vMap)
Method subMap.
|
java.lang.String |
toString()
toString
|
void |
unify()
unify - make VElement unique, retaining initial order
|
add, add, addAll, addAll, clear, contains, ensureCapacity, forEach, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeIf, removeRange, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray, trimToSizepublic JDFAttributeMapArray()
public JDFAttributeMapArray(java.util.Collection<JDFAttributeMap> toAdd)
toAdd - Vector of elements to clonepublic JDFAttributeMapArray(JDFAttributeMap[] toAdd)
toAdd - the arraypublic JDFAttributeMapArray(JDFAttributeMap moreMap)
moreMap - the single attribute map to addpublic java.lang.String toString()
toString in class java.util.AbstractCollection<JDFAttributeMap>public static JDFAttributeMapArray getNonEmpty(JDFAttributeMapArray v)
v - public static JDFAttributeMapArray getArray(JDFAttributeMap partMap)
partMap - public static boolean isEmpty(java.util.Collection<JDFAttributeMap> v)
v - public java.lang.String showKeys(java.lang.String sepMap,
java.lang.String sepEntry)
sepMap - the separator between mapssepEntry - the separator between map entriespublic java.util.List<java.lang.String> getPartValues(java.lang.String strKey,
boolean bUnique)
strKey - the attribute to get values frombUnique - if true, ensure unique vector, else the vector corresponds to the vector of valuespublic JDFAttributeMapArray getAndMaps(JDFAttributeMap map)
map - the given mappublic JDFAttributeMapArray getOrMaps(JDFAttributeMap map)
map - the given mappublic JDFAttributeMapArray getOrMaps(JDFAttributeMapArray vMap)
map - the given mappublic boolean containsKey(java.lang.String key)
key - the key to check forMap.containsKey(java.lang.Object)public int maxSize()
public int minSize()
public JDFAttributeMap get(int i)
get in interface java.util.List<JDFAttributeMap>get in class java.util.ArrayList<JDFAttributeMap>i - the given positionpublic JDFAttributeMapArray removeKeys(java.util.Collection<java.lang.String> set)
set - public JDFAttributeMapArray removeKey(java.lang.String key)
key - public void reduceMap(java.util.Collection<java.lang.String> keySet)
this by keySet (only entries in keyset are retained)keySet - public StringArray getKeys()
public JDFAttributeMap getCommonMap()
public void unify()
public void appendUnique(JDFAttributeMap map)
map - map to appendpublic void appendUnique(JDFAttributeMapArray maps)
maps - maps to appendpublic JDFAttributeMapArray overlapMap(JDFAttributeMap map)
map - the map to check againstpublic JDFAttributeMapArray getOverlapMaps(JDFAttributeMap map)
map - the map to check againstpublic JDFAttributeMapArray getMatchingMaps(java.lang.String key, java.lang.String regExp, boolean ignoreCase)
key - the key to matchregExp - the simplified regexpignoreCase - duh...public JDFAttributeMapArray overlapMap(JDFAttributeMapArray vMap)
vMap - the map to check againstpublic boolean overlapsMap(JDFAttributeMap map)
map - the map to check againstpublic boolean subMap(JDFAttributeMap map)
map - the submap to check againstpublic boolean subMap(JDFAttributeMapArray vMap)
vMap - the vector submaps to check againstpublic boolean overlapsMap(JDFAttributeMapArray vMap)
vMap - the vector to check againstpublic boolean equals(java.lang.Object other)
equals in interface java.util.Collection<JDFAttributeMap>equals in interface java.util.List<JDFAttributeMap>equals in class java.util.AbstractList<JDFAttributeMap>other - in this case VJDFAttributeMap to comparepublic void put(java.lang.Object key,
java.lang.Object value)
key - the key to set - may be either String or Enumvalue - the value to set - may be either String or Enumjava.lang.IllegalArgumentException - if key or value have the wrong typepublic int hashCode()
hashCode in interface java.util.Collection<JDFAttributeMap>hashCode in interface java.util.List<JDFAttributeMap>hashCode in class java.util.AbstractList<JDFAttributeMap>public void put(java.lang.String key,
java.lang.String value)
key - the key to setvalue - the value to setpublic JDFAttributeMapArray clone()
clone in class java.util.ArrayList<JDFAttributeMap>also clones the underlying mapspublic void removeMaps(JDFAttributeMap map)
map - public void put(JDFAttributeMap commonMap)
commonMap -