|
Coinjema 1.7 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.coinjema.collections.HashTree<T>
org.coinjema.collections.ListedHashTree<T>
public class ListedHashTree<T>
ListedHashTree is a different implementation of the HashTree
collection class. In the ListedHashTree, the order in which values are added
is preserved (not to be confused with SortedHashTree, which sorts
the order of the values using the compare() function). Any listing of nodes
or iteration through the list of nodes of a ListedHashTree will be given in
the order in which the nodes were added to the tree.
HashTree,
Serialized Form| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface java.util.Map |
|---|
Map.Entry<K,V> |
| Field Summary |
|---|
| Fields inherited from class org.coinjema.collections.HashTree |
|---|
data |
| Constructor Summary | |
|---|---|
ListedHashTree()
|
|
ListedHashTree(Collection<? extends T> keys)
|
|
ListedHashTree(T key)
|
|
ListedHashTree(T[] keys)
|
|
| Method Summary | |
|---|---|
HashTree<T> |
add(T key)
Adds an key into the HashTree at the current level. |
void |
clear()
Clears the HashTree of all contents. |
HashTree<T> |
clone()
Create a clone of this HashTree. |
HashTree<T> |
createNewTree()
Creates a new tree. |
HashTree<T> |
createNewTree(Collection<? extends T> values)
Creates a new tree. |
HashTree<T> |
createNewTree(T key)
Creates a new tree. |
boolean |
equals(Object o)
Compares all objects in the tree and verifies that the two trees contain the same objects at the same tree levels. |
int |
hashCode()
Returns a hashcode for this HashTree. |
Collection<T> |
list()
Gets a Collection of all keys in the current HashTree node. |
HashTree<T> |
remove(Object key)
Removes the entire branch specified by the given key. |
void |
replace(Object currentKey,
T newKey)
Finds the given current key, and replaces it with the given new key. |
void |
set(HashTree<T> t)
|
void |
set(T key,
Collection<? extends T> values)
Sets a key and its values in the HashTree. |
void |
set(T key,
HashTree<T> t)
Sets a key into the current tree and assigns it a HashTree as its subtree. |
void |
set(T key,
T value)
Sets a key and it's value in the HashTree. |
void |
set(T key,
T[] values)
Sets a key and it's values in the HashTree. |
int |
size()
Returns the number of top-level entries in the HashTree. |
| Methods inherited from class org.coinjema.collections.HashTree |
|---|
add, add, add, add, add, add, add, add, add, add, add, add, add, add, addTreePath, cloneTree, containsKey, containsValue, entrySet, get, getObject, getObject, getObject, getObject, getTree, getTree, getTree, getTreePath, isEmpty, keySet, list, list, list, put, putAll, remove, search, set, set, set, set, set, set, set, toString, traverse, values |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public ListedHashTree()
public ListedHashTree(T key)
public ListedHashTree(Collection<? extends T> keys)
public ListedHashTree(T[] keys)
| Method Detail |
|---|
public HashTree<T> clone()
HashTree
clone in class HashTree<T>Object.clone()
public void set(T key,
T value)
HashTree
set in class HashTree<T>key - key to be set upvalue - value to be set up as a key in the secondary node
public void set(T key,
HashTree<T> t)
HashTree
set in class HashTree<T>key - key to be set upt - HashTree that the key maps to
public void set(T key,
T[] values)
HashTree
set in class HashTree<T>key - Key to be set upvalues - Array of objects to be added as keys in the secondary node
public void set(T key,
Collection<? extends T> values)
HashTree
set in class HashTree<T>key - key to be set upvalues - Collection of objects to be added as keys in the secondary
node
public void replace(Object currentKey,
T newKey)
HashTree
replace in class HashTree<T>public HashTree<T> createNewTree()
HashTree
createNewTree in class HashTree<T>public HashTree<T> createNewTree(T key)
HashTree
createNewTree in class HashTree<T>public HashTree<T> createNewTree(Collection<? extends T> values)
HashTree
createNewTree in class HashTree<T>public HashTree<T> add(T key)
HashTree
add in class HashTree<T>key - key to be added to HashTreepublic Collection<T> list()
HashTree
list in class HashTree<T>public HashTree<T> remove(Object key)
HashTree
remove in interface Map<T,HashTree<T>>remove in class HashTree<T>Map.remove(Object)public int hashCode()
HashTree
hashCode in interface Map<T,HashTree<T>>hashCode in class HashTree<T>Object.hashCode()public boolean equals(Object o)
HashTree
equals in interface Map<T,HashTree<T>>equals in class HashTree<T>o - Object to be compared againstObject.equals(Object)public int size()
HashTree
size in interface Map<T,HashTree<T>>size in class HashTree<T>Map.size()public void clear()
HashTree
clear in interface Map<T,HashTree<T>>clear in class HashTree<T>Map.clear()public void set(HashTree<T> t)
set in class HashTree<T>
|
Coinjema 1.7 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||