|
Apache JMeter | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.jorphan.collections.HashTree org.apache.jorphan.collections.ListedHashTree
public class ListedHashTree
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 FormNested Class Summary |
---|
Nested classes/interfaces inherited from interface java.util.Map |
---|
Map.Entry<K,V> |
Field Summary |
---|
Fields inherited from class org.apache.jorphan.collections.HashTree |
---|
data |
Constructor Summary | |
---|---|
ListedHashTree()
|
|
ListedHashTree(Collection<?> keys)
|
|
ListedHashTree(Object key)
|
|
ListedHashTree(Object[] keys)
|
Method Summary | |
---|---|
HashTree |
add(Object key)
Adds an key into the HashTree at the current level. |
void |
clear()
Clears the HashTree of all contents. |
Object |
clone()
Create a clone of this HashTree. |
HashTree |
createNewTree()
Creates a new tree. |
HashTree |
createNewTree(Collection<?> values)
Creates a new tree. |
HashTree |
createNewTree(Object 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. |
Object[] |
getArray()
Gets an array of all keys in the current HashTree node. |
int |
hashCode()
Returns a hashcode for this HashTree. |
Set<Object> |
keySet()
Returns a Set of all the keys in the top-level of this HashTree. |
Collection<Object> |
list()
Gets a Collection of all keys in the current HashTree node. |
HashTree |
remove(Object key)
Removes the entire branch specified by the given key. |
void |
replace(Object currentKey,
Object newKey)
Finds the given current key, and replaces it with the given new key. |
void |
set(Object key,
Collection<?> values)
Sets a key and its values in the HashTree. |
void |
set(Object key,
HashTree t)
Sets a key into the current tree and assigns it a HashTree as its subtree. |
void |
set(Object key,
Object value)
Sets a key and it's value in the HashTree. |
void |
set(Object key,
Object[] values)
Sets a key and its values in the HashTree. |
int |
size()
Returns the number of top-level entries in the HashTree. |
Methods inherited from class org.apache.jorphan.collections.HashTree |
---|
add, add, add, add, add, add, add, add, add, add, add, add, add, addTreePath, cloneTree, containsKey, containsValue, entrySet, get, getArray, getArray, getArray, getTree, getTree, getTree, getTreePath, isEmpty, list, list, list, put, putAll, search, 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(Object key)
public ListedHashTree(Collection<?> keys)
public ListedHashTree(Object[] keys)
Method Detail |
---|
public Object clone()
clone
in class HashTree
public void set(Object key, Object value)
set
in class HashTree
key
- key to be set upvalue
- value to be set up as a key in the secondary nodepublic void set(Object key, HashTree t)
set
in class HashTree
key
- key to be set upt
- HashTree that the key maps topublic void set(Object key, Object[] values)
set
in class HashTree
key
- Key to be set upvalues
- Array of objects to be added as keys in the secondary nodepublic void set(Object key, Collection<?> values)
set
in class HashTree
key
- key to be set upvalues
- Collection of objects to be added as keys in the secondary
nodepublic void replace(Object currentKey, Object newKey)
replace
in class HashTree
public HashTree createNewTree()
createNewTree
in class HashTree
public HashTree createNewTree(Object key)
createNewTree
in class HashTree
public HashTree createNewTree(Collection<?> values)
createNewTree
in class HashTree
public HashTree add(Object key)
add
in class HashTree
key
- key to be added to HashTreepublic Collection<Object> list()
list
in class HashTree
public HashTree remove(Object key)
remove
in interface Map<Object,HashTree>
remove
in class HashTree
Map.remove(Object)
public Object[] getArray()
getArray
in class HashTree
public int hashCode()
hashCode
in interface Map<Object,HashTree>
hashCode
in class HashTree
Object.hashCode()
public boolean equals(Object o)
equals
in interface Map<Object,HashTree>
equals
in class HashTree
o
- Object to be compared againstObject.equals(Object)
public Set<Object> keySet()
keySet
in interface Map<Object,HashTree>
keySet
in class HashTree
Map.keySet()
public int size()
size
in interface Map<Object,HashTree>
size
in class HashTree
Map.size()
public void clear()
clear
in interface Map<Object,HashTree>
clear
in class HashTree
Map.clear()
|
Apache JMeter | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |