public class VJDFAttributeMap extends Vector<JDFAttributeMap>
capacityIncrement, elementCount, elementData
modCount
Constructor and Description |
---|
VJDFAttributeMap()
constructor
|
VJDFAttributeMap(JDFAttributeMap moreMap) |
VJDFAttributeMap(JDFAttributeMap[] toAdd)
constructor from array, the map elements are not cloned
|
VJDFAttributeMap(Vector<JDFAttributeMap> toAdd)
copy constructor, the map elements are cloned
|
Modifier and Type | Method and Description |
---|---|
void |
addall(VJDFAttributeMap v)
Deprecated.
use addAll
|
void |
appendUnique(JDFAttributeMap map) |
void |
appendUnique(VJDFAttributeMap map)
Method appendUnique.
|
VJDFAttributeMap |
clone() |
boolean |
containsKey(Object key) |
JDFAttributeMap |
elementAt(int i)
Returns the element at the given position
|
boolean |
equals(Object other)
equals - Compares two map vectors, returns true if content equal regardless
of element order, otherwise false.
|
void |
extendMap(String strKey,
VString vsValues)
replace all maps in this with n maps that have the values strKey, vsValues
|
JDFAttributeMap |
get(int i)
Returns the element at the given position (may be<0 to count backwards)
|
VJDFAttributeMap |
getAndMaps(JDFAttributeMap map)
andMap - builds a new vector of maps with identical pairs of both maps does
not modify this
|
JDFAttributeMap |
getCommonMap()
return the map that is common to all elements of this.
|
VString |
getKeys()
return list of all keys
|
VJDFAttributeMap |
getMatchingMaps(String key,
String regExp,
boolean ignoreCase)
Method overlapMap. get a copy of this with all matching maps the maps are NOT
cloned
|
VJDFAttributeMap |
getOrMaps(JDFAttributeMap map)
andMap - builds a new vector of maps with identical pairs of both maps does
not modify this
|
VJDFAttributeMap |
getOverlapMaps(JDFAttributeMap map)
Method overlapMap. get a copy of this with all overlapping maps the maps are
NOT cloned
|
VString |
getPartValues(String strKey,
boolean bUnique) |
Vector<JDFAttributeMap> |
getVector()
Deprecated.
- use this
|
boolean |
hasEntryWithEqualKeyValuePairs(JDFAttributeMap attmap)
Deprecated.
use contains
|
int |
hashCode()
hashCode complements equals() to fulfill the equals/hashCode contract
|
int |
maxSize()
Return the maximum size size of a JDFAttributeMap in this
|
int |
minSize()
Return the minimum size size of a JDFAttributeMap in this
|
void |
overlapMap(JDFAttributeMap map)
Method overlapMap. removes all non-overlapping maps from this
|
void |
overlapMap(VJDFAttributeMap vMap)
Method overlapMap. only entries that contain at least one matching map entry
are retained
|
boolean |
overlapsMap(JDFAttributeMap map)
Method overlapMap.
|
boolean |
overlapsMap(VJDFAttributeMap vMap)
Method overlapsMap. returns true if at least one element exists that has no
non-matching key value pairs
|
void |
put(JDFAttributeMap commonMap)
put the value of all keys into every existing map
|
void |
put(Object key,
Object value)
put the key value pair into all entries
|
void |
put(String key,
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 |
reduceKey(Vector vKeys)
Deprecated.
use reduceMap
|
void |
reduceMap(Collection<String> keySet)
reduce each JDFAttributeMap in
this by keySet (only entries in
keyset are retained) |
void |
removeKey(String key)
remove the key specified and then erase any duplicates and emptys
|
void |
removeKeys(Collection<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. if map is subMap of this
|
void |
setVector(Vector<JDFAttributeMap> vec)
sets the Vector with JDFAttributeMap elements
|
String |
showKeys(String sepMap,
String sepEntry) |
boolean |
subMap(JDFAttributeMap map)
Method subMap.
|
boolean |
subMap(VJDFAttributeMap vMap)
Method subMap.
|
String |
toString()
toString
|
void |
unify()
unify - make VElement unique, retaining initial order
|
add, add, addAll, addAll, addElement, capacity, clear, contains, containsAll, copyInto, elements, ensureCapacity, firstElement, forEach, indexOf, indexOf, insertElementAt, isEmpty, iterator, lastElement, lastIndexOf, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeAllElements, removeElement, removeElementAt, removeIf, removeRange, replaceAll, retainAll, set, setElementAt, setSize, size, sort, spliterator, subList, toArray, toArray, trimToSize
finalize, getClass, notify, notifyAll, wait, wait, wait
parallelStream, stream
public VJDFAttributeMap()
public VJDFAttributeMap(Vector<JDFAttributeMap> toAdd)
toAdd
- Vector of elements to clonepublic VJDFAttributeMap(JDFAttributeMap[] toAdd)
toAdd
- the arraypublic VJDFAttributeMap(JDFAttributeMap moreMap)
moreMap
- the single attribute map to addpublic String toString()
toString
in class Vector<JDFAttributeMap>
public String showKeys(String sepMap, String sepEntry)
sepMap
- the separator between mapssepEntry
- the separator between map entries@Deprecated public Vector<JDFAttributeMap> getVector()
public VString getPartValues(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 void extendMap(String strKey, VString vsValues)
strKey
- the new key to addvsValues
- String of valuespublic VJDFAttributeMap getAndMaps(JDFAttributeMap map)
map
- the given mappublic VJDFAttributeMap getOrMaps(JDFAttributeMap map)
map
- the given mappublic boolean containsKey(Object key)
key
- the key to check forMap.containsKey(java.lang.Object)
public void setVector(Vector<JDFAttributeMap> vec)
vec
- the Vector with JDFAttributeMap elementspublic int maxSize()
public int minSize()
public JDFAttributeMap elementAt(int i)
elementAt
in class Vector<JDFAttributeMap>
i
- the given position (may be<0 to count backwards)public JDFAttributeMap get(int i)
get
in interface List<JDFAttributeMap>
get
in class Vector<JDFAttributeMap>
i
- the given positionpublic void removeKeys(Collection<String> set)
set
- public void removeKey(String key)
key
- @Deprecated public boolean hasEntryWithEqualKeyValuePairs(JDFAttributeMap attmap)
attmap
- the given JDFAttributeMap element@Deprecated public void reduceKey(Vector vKeys)
vKeys
- public void reduceMap(Collection<String> keySet)
this
by keySet (only entries in
keyset are retained)keySet
- public VString getKeys()
public JDFAttributeMap getCommonMap()
public void appendUnique(JDFAttributeMap map)
map
- map to appendpublic void unify()
public void appendUnique(VJDFAttributeMap map)
map
- maps to append@Deprecated public void addall(VJDFAttributeMap v)
v
- public void overlapMap(JDFAttributeMap map)
map
- the map to check againstpublic VJDFAttributeMap getOverlapMaps(JDFAttributeMap map)
map
- the map to check againstpublic VJDFAttributeMap getMatchingMaps(String key, String regExp, boolean ignoreCase)
key
- the key to matchregExp
- the simplified regexpignoreCase
- duh...public void overlapMap(VJDFAttributeMap 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(VJDFAttributeMap vMap)
vMap
- the vector submaps to check againstpublic boolean overlapsMap(VJDFAttributeMap vMap)
vMap
- the vector to check againstpublic boolean equals(Object other)
equals
in interface Collection<JDFAttributeMap>
equals
in interface List<JDFAttributeMap>
equals
in class Vector<JDFAttributeMap>
other
- in this case VJDFAttributeMap to comparepublic int hashCode()
hashCode
in interface Collection<JDFAttributeMap>
hashCode
in interface List<JDFAttributeMap>
hashCode
in class Vector<JDFAttributeMap>
public void put(Object key, Object value)
key
- the key to set - may be either String or Enumvalue
- the value to set - may be either String or EnumIllegalArgumentException
- if key or value have the wrong typepublic void put(String key, String value)
key
- the key to setvalue
- the value to setpublic VJDFAttributeMap clone()
clone
in class Vector<JDFAttributeMap>
also clones the underlying maps
public void removeMaps(JDFAttributeMap map)
map
- public void put(JDFAttributeMap commonMap)
commonMap
- Copyright © 2018. All rights reserved.