|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.util.AbstractMap<K,V>
java.util.HashMap<key,java.util.Vector<vectorObject>>
org.cip4.jdflib.util.VectorMap<key,vectorObject>
key - the type used for the keyvectorObject - the type used for individual elements of each vector in the mappublic class VectorMap<key,vectorObject>
HashMap of multiple elements utility class
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class java.util.AbstractMap |
|---|
java.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V> |
| Field Summary | |
|---|---|
private static long |
serialVersionUID
|
| Constructor Summary | |
|---|---|
VectorMap()
null constructor |
|
| Method Summary | |
|---|---|
void |
appendUnique(key key,
java.util.Vector<vectorObject> vVal)
append a map, ensuring uniqueness |
void |
appendUnique(VectorMap<key,vectorObject> map)
append a VectorMap, ensuring uniqueness |
java.util.Vector<vectorObject> |
getAllValues()
get all values as one big vector, multiple entries are retained (see ContainerUtil.unify()) |
int |
getIndex(key key,
vectorObject singleObject)
get the index of singleObject in the vector of key |
vectorObject |
getOne(java.lang.Object key,
int i)
get the value for key |
void |
putOne(key key,
vectorObject val)
put the value for key, ensuring uniqueness |
void |
removeOne(key key,
vectorObject val)
remove the value for key,also remove key if the vector is empty |
void |
setOne(key key,
vectorObject newObj,
vectorObject oldObj)
replace the value for key, add if oldObj==null or is not there |
int |
size(key key)
get the size of the vector for key |
| Methods inherited from class java.util.HashMap |
|---|
clear, clone, containsKey, containsValue, entrySet, get, isEmpty, keySet, put, putAll, remove, size, values |
| Methods inherited from class java.util.AbstractMap |
|---|
equals, hashCode, toString |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.util.Map |
|---|
equals, hashCode |
| Field Detail |
|---|
private static final long serialVersionUID
| Constructor Detail |
|---|
public VectorMap()
| Method Detail |
|---|
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 vector
public int getIndex(key key,
vectorObject singleObject)
key - the key of the vectorsingleObject - the object to search
public int size(key key)
key - the key of the vector
public void putOne(key key,
vectorObject val)
key - the key of the vectorval - the vector element
public 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 void removeOne(key key,
vectorObject val)
key - the key of the vectorval - the vector element
public void setOne(key key,
vectorObject newObj,
vectorObject oldObj)
key - the key of the vectornewObj - the new object to setoldObj - the old object to replace
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||