org.isam.exehda.services.cc
Class HashTreeSpaceNode

java.lang.Object
  |
  +--org.isam.exehda.services.cc.HashTreeSpaceNode

class HashTreeSpaceNode
extends java.lang.Object

Describe class HashTreeSpaceNode here. This class need java Collection API. It will not compile on J2ME systems.

Version:
$Date: 2004/06/16 15:16:23 $ $Revision: 1.2 $
Author:
last modified by $Author: lucc $

Constructor Summary
HashTreeSpaceNode(java.lang.Object tag, int level, HashTreeSpace space)
           
 
Method Summary
 HashTreeSpaceNode findParent(CCManager.Tuple pattern)
          Follows down this node subtree looking for the node that is the parent for tuples that match the given pattern.
 CCManager.Tuple findTuple(CCManager.Tuple pattern, boolean remove)
          Find a tuple in this node's tupleList that matches the given pattern.
 void insertTuple(CCManager.Tuple t)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

HashTreeSpaceNode

public HashTreeSpaceNode(java.lang.Object tag,
                         int level,
                         HashTreeSpace space)
Method Detail

findParent

public HashTreeSpaceNode findParent(CCManager.Tuple pattern)
Follows down this node subtree looking for the node that is the parent for tuples that match the given pattern.

Parameters:
pattern - the pattern to be matched
Returns:
the HashTreeSpaceNode that owns at least one tuple that matches the pattern, or null if such node does not exist.

findTuple

public CCManager.Tuple findTuple(CCManager.Tuple pattern,
                                 boolean remove)
Find a tuple in this node's tupleList that matches the given pattern. Typically, two cases would happen: In both cases, if the flag parameter remove is set to true, the tuple is removed from the tupleList before return. Otherwise, the tuple is kept in the tupleList. This node should be previously selected through findParent. If a pattern that do not match the current node prefix is passed to findTuple() the behavior of this method is unspecified, possibly returning a false matching tuple.

Parameters:
pattern - Pattern to be matched
remove - If true, the tuple is removed, otherwise it is not
Returns:
A tuple that matches the pattern or null if no one could be found.

insertTuple

public void insertTuple(CCManager.Tuple t)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object