|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jlog2.util.CollectionHandler
public class CollectionHandler
This provides some utility functions for java.util collections or lists, etc.
| Constructor Summary | |
|---|---|
CollectionHandler()
|
|
| Method Summary | |
|---|---|
static void |
addAll(java.util.Vector addTo,
java.util.Vector toAdd)
Add all values in toAdd to addTo. |
static void |
addAllSet(java.util.Vector addTo,
java.util.Vector toAdd)
Add all values in toAdd to addTo, but do not allow duplication of existing values. |
static java.util.Vector |
cloneHashKeys(java.util.Hashtable toClone)
Clone the hashtable keys and return as a list. |
static java.util.Hashtable |
cloneHashtable(java.util.Hashtable toClone)
Clone the hashtable list and return. |
static java.util.Vector |
cloneHashValues(java.util.Hashtable toClone)
Clone the hashtable values and return as a list. |
static java.util.Vector |
cloneVector(java.util.Vector toClone)
Clone the vector list and return. |
static java.util.Vector |
combinedVector(java.util.Vector list1,
java.util.Vector list2)
Return a list of all elements that are in both list 1 and list 2. |
static void |
putAll(java.util.Hashtable addTo,
java.util.Hashtable toAdd)
Add all values in toAdd to addTo. |
static java.util.Vector |
reciprocalVector(java.util.Vector list1,
java.util.Vector list2)
Return a list of all elements that are in list 1 but not in list 2. |
static void |
removeAll(java.util.Vector removeFrom,
java.util.Vector toRemove)
Remove all values in toRemove from removeFrom. |
static java.lang.Object[] |
toArray(java.util.Vector toClone)
Clone the list and return as an array. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public CollectionHandler()
| Method Detail |
|---|
public static java.util.Vector cloneVector(java.util.Vector toClone)
toClone - the list to clone.
public static void addAll(java.util.Vector addTo,
java.util.Vector toAdd)
addTo - the list to add to.toAdd - the values to add.
public static void addAllSet(java.util.Vector addTo,
java.util.Vector toAdd)
addTo - the list to add to.toAdd - the values to add.
public static void removeAll(java.util.Vector removeFrom,
java.util.Vector toRemove)
removeFrom - the list to remove from.toRemove - the list of items to remove.
public static java.util.Vector combinedVector(java.util.Vector list1,
java.util.Vector list2)
list1 - the first list of indexes.list2 - the second list of indexes.
public static java.util.Vector reciprocalVector(java.util.Vector list1,
java.util.Vector list2)
list1 - the first list of indexes.list2 - the second list of indexes.
public static java.lang.Object[] toArray(java.util.Vector toClone)
toClone - the list to clone.
public static java.util.Hashtable cloneHashtable(java.util.Hashtable toClone)
toClone - the list to clone.
public static java.util.Vector cloneHashKeys(java.util.Hashtable toClone)
toClone - the list to clone.
public static java.util.Vector cloneHashValues(java.util.Hashtable toClone)
toClone - the list to clone.
public static void putAll(java.util.Hashtable addTo,
java.util.Hashtable toAdd)
addTo - the hashtable to add to.toAdd - the values to add.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||