key - the type used for the keyvectorObject - the type used for individual elements of each vector in the map@Deprecated
public class VectorMap<key,vectorObject>
extends java.util.HashMap<key,java.util.Vector<vectorObject>>
| Constructor and Description |
|---|
VectorMap()
Deprecated.
null constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
appendUnique(key key,
java.util.Vector<vectorObject> vVal)
Deprecated.
append a map, ensuring uniqueness
|
void |
appendUnique(VectorMap<key,vectorObject> map)
Deprecated.
append a VectorMap, ensuring uniqueness
|
void |
fillInvertedMap(java.util.Map<vectorObject,key> map)
Deprecated.
fill this with the values in map by switching key and value
|
java.util.Vector<vectorObject> |
getAllValues()
Deprecated.
get all values as one big vector, multiple entries are retained (see
ContainerUtil.unify()) |
int |
getIndex(key key,
vectorObject singleObject)
Deprecated.
get the index of singleObject in the vector of key
|
java.util.Map<vectorObject,key> |
getInvertedMap()
Deprecated.
get an inverted map that uses all entries a s keys and vice versa
note that the behavior is undefined in case of multiple identical values |
vectorObject |
getOne(java.lang.Object key,
int i)
Deprecated.
get the value for key
|
boolean |
isUnique()
Deprecated.
Getter for bUnique attribute.
|
void |
putOne(key key,
vectorObject val)
Deprecated.
put the value for key, ensuring uniqueness
|
void |
removeOne(key key,
vectorObject val)
Deprecated.
remove the value for key,also remove key if the vector is empty
|
void |
setOne(key key,
vectorObject newObj,
int pos)
Deprecated.
insert the value for keyat position pos
|
void |
setOne(key key,
vectorObject newObj,
vectorObject oldObj)
Deprecated.
replace the value for key, add if oldObj==null or is not there
|
void |
setUnique(boolean bUnique)
Deprecated.
Setter for bUnique attribute.
|
int |
size(key key)
Deprecated.
get the size of the vector for key
|
clear, clone, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, forEach, get, getOrDefault, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, valuespublic void fillInvertedMap(java.util.Map<vectorObject,key> map)
map - public vectorObject getOne(java.lang.Object key, int i)
key - the search keyi - the index in the vecor matching key; if <0 count from the back of the vectorpublic int getIndex(key key, vectorObject singleObject)
key - the key of the vectorsingleObject - the object to searchpublic int size(key key)
key - the key of the vectorpublic void putOne(key key, vectorObject val)
key - the key of the vectorval - the vector elementpublic void appendUnique(key key, java.util.Vector<vectorObject> vVal)
key - the key of the vectorvVal - the vector of elementspublic void appendUnique(VectorMap<key,vectorObject> map)
map - the map to addpublic java.util.Vector<vectorObject> getAllValues()
ContainerUtil.unify())public java.util.Map<vectorObject,key> getInvertedMap()
public void removeOne(key key, vectorObject val)
key - the key of the vectorval - the vector elementpublic void setOne(key key, vectorObject newObj, vectorObject oldObj)
key - the key of the vectornewObj - the new object to setoldObj - the old object to replacepublic void setOne(key key, vectorObject newObj, int pos)
key - the key of the vectornewObj - the new object to setpos - the index in the vector, may be <0 to count from the endjava.lang.IllegalArgumentException - if pos is negative and abs(pos)>size()public boolean isUnique()
public void setUnique(boolean bUnique)
bUnique - the bUnique to set