fr.paris5.shaman.insight.operation
Class TopicNodeImpl
java.lang.Object
|
+--fr.paris5.shaman.insight.operation.TopicNodeImpl
- All Implemented Interfaces:
- java.io.Serializable, TopicNode
- class TopicNodeImpl
- extends java.lang.Object
- implements TopicNode
Implementation of a TopicNode.
- Version:
- $Id: TopicNodeImpl.java,v 1.3 2002/07/25 13:18:08 caillette Exp $
- Author:
- Laurent Caillette
- See Also:
- Serialized Form
Methods inherited from class java.lang.Object |
, clone, finalize, getClass, notify, notifyAll, registerNatives, wait, wait, wait |
serialVersionUID
static final long serialVersionUID
topic
private final Topic topic
children
private final java.util.ArrayList children
parent
private TopicNode parent
TopicNodeImpl
public TopicNodeImpl(Topic topic)
equals
public boolean equals(java.lang.Object obj)
- Performs a recursive check for equality on the whole tree.
- Overrides:
equals
in class java.lang.Object
- Parameters:
obj
- - Returns:
-
nodeEquals
private boolean nodeEquals(TopicNode other)
descendingEquals
public boolean descendingEquals(TopicNode other)
hashCode
public int hashCode()
- Overrides:
hashCode
in class java.lang.Object
setParent
public void setParent(TopicNodeImpl parent)
getParent
public TopicNode getParent()
- Specified by:
getParent
in interface TopicNode
getTopic
public Topic getTopic()
- Specified by:
getTopic
in interface TopicNode
addChild
private void addChild(TopicNode child)
hasChildren
public boolean hasChildren()
- Specified by:
hasChildren
in interface TopicNode
getChildCount
public int getChildCount()
- Specified by:
getChildCount
in interface TopicNode
getChildAt
public TopicNode getChildAt(int index)
- Specified by:
getChildAt
in interface TopicNode
getChildren
public TopicNode[] getChildren()
- Specified by:
getChildren
in interface TopicNode
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
isRoot
public boolean isRoot()
- Specified by:
isRoot
in interface TopicNode
getDepth
public int getDepth()
- Specified by:
getDepth
in interface TopicNode
getRoot
public TopicNode getRoot()
- Specified by:
getRoot
in interface TopicNode
addChildren
private void addChildren(java.util.List list,
TopicNode parent)
flatten
public TopicNode[] flatten()
- Specified by:
flatten
in interface TopicNode
Copyright © 2002 Laurent Caillette and l'Université René Descartes, Paris 5. All rights reserved.