|
Oracle® Coherence Java API Reference Release 3.7.1.0 E22843-01 |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
com.tangosol.util.Base
com.tangosol.util.Tree
public class Tree
A thread-safe balanced binary search tree.
As of Coherence 3.3 this class is a wrapper around TreeMap
.
Note: Where practical, use java.util.TreeMap
; including external syncronization as necessary.
Field Summary | |
---|---|
protected java.util.TreeMap |
m_tree The delgate tree. |
Constructor Summary | |
---|---|
Tree() Default constructor. |
Method Summary | |
---|---|
void |
add(java.lang.Comparable key) Add the passed key to the tree. |
boolean |
addAll(Tree that) Adds all of the nodes in the specified Tree to this Tree if they are not already present. |
void |
clear() Remove all nodes from the tree. |
java.lang.Object |
clone() Make a shallow copy of the tree and its nodes. |
boolean |
contains(java.lang.Comparable key) Determine if the passed key is in the tree. |
java.util.Enumeration |
elements() Create an enumerator for the tree's values. |
boolean |
equals(java.lang.Object obj) Test for tree equality. |
java.lang.Object |
get(java.lang.Comparable key) Find the specified key and return its value. |
int |
getSize() Determine the size of the tree. |
protected java.util.Enumeration |
getUnsynchronizedKeyEnumerator() Get an enumerator of the nodes in the tree. |
protected java.util.Enumeration |
getUnsynchronizedKeyEnumerator(java.lang.Comparable key) Get an enumerator of the nodes in the tree. |
boolean |
isEmpty() Test for empty tree. |
java.util.Enumeration |
keys() Create an in-order enumerator for the tree's keys. |
void |
print() In-order printing of the contents of the tree. |
void |
put(java.lang.Comparable key, java.lang.Object value) Add the passed key to the tree and associate the passed value with the key. |
void |
putAll(Tree that) Puts all of the nodes in the specified Tree to this Tree (including the ones that are already present). |
java.lang.Object |
remove(java.lang.Comparable key) Remove the specified key from the tree, returning its associated value. |
boolean |
removeAll(Tree that) Removes from this Tree all of its nodes that are contained in the specified Tree. |
boolean |
retainAll(Tree that) Retains only the nodes in this Tree that are contained in the specified Tree. |
java.lang.String |
toString() Provide a string representation of the tree. |
Field Detail |
---|
protected java.util.TreeMap m_tree
Constructor Detail |
---|
public Tree()
Method Detail |
---|
public void add(java.lang.Comparable key)
key
- the key to add to the treepublic void put(java.lang.Comparable key, java.lang.Object value)
key
- the key to add to the treevalue
- the object to associate with the keypublic java.lang.Object get(java.lang.Comparable key)
key
- the key to look for in the treepublic boolean contains(java.lang.Comparable key)
key
- the key to look for in the treepublic java.lang.Object remove(java.lang.Comparable key)
key
- the key to look for in the treepublic void clear()
public int getSize()
public boolean isEmpty()
public java.util.Enumeration keys()
public java.util.Enumeration elements()
public boolean addAll(Tree that)
Collection.addAll(Collection)
public void putAll(Tree that)
public boolean retainAll(Tree that)
Collection.retainAll(Collection)
public boolean removeAll(Tree that)
Collection.removeAll(Collection)
public java.lang.String toString()
public boolean equals(java.lang.Object obj)
public java.lang.Object clone()
public void print()
protected java.util.Enumeration getUnsynchronizedKeyEnumerator()
protected java.util.Enumeration getUnsynchronizedKeyEnumerator(java.lang.Comparable key)
|
Oracle® Coherence Java API Reference Release 3.7.1.0 E22843-01 |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |