fr.inria.peerunit.util
Class HTree<K,V>

java.lang.Object
  extended by fr.inria.peerunit.util.HTree<K,V>

public class HTree<K,V>
extends java.lang.Object

The HTree is an hierarchical tree.

Author:
sunye

Constructor Summary
HTree(int b)
           
 
Method Summary
 void clear()
           
 boolean containsKey(K key)
          Checks if an element belongs to this Tree
 HNode<K,V> head()
           
 void put(K key, V value)
          Inserts an element into the tree.
 int size()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HTree

public HTree(int b)
Method Detail

head

public HNode<K,V> head()
Returns:
the head of this HTree. Returns null if empty.

put

public void put(K key,
                V value)
Inserts an element into the tree. The first inserted element becomes the header.

Parameters:
e -

containsKey

public boolean containsKey(K key)
Checks if an element belongs to this Tree

Parameters:
e - the element to check
Returns:
true, if the tree contains the element.

size

public int size()

clear

public void clear()


Copyright © 2010. All Rights Reserved.