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 $
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
HashTreeSpaceNode
public HashTreeSpaceNode(java.lang.Object tag,
int level,
HashTreeSpace space)
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:
- the current node completely matches the pattern, so any tuple
in the nodes list would be returned.
- the current node is a leaf, and it just partially matches
the given pattern. Is this case, the remaining tags in the
pattern must be checked against the tuples in the tuplesList
until we have a complete matching.
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 matchedremove
- 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