de.qfs.apps.qflog.logview
Class FilterNode

java.lang.Object
  |
  +--de.qfs.apps.qflog.logview.FilterNode

public class FilterNode
extends java.lang.Object
implements java.lang.Comparable

Node of the log filter tree hierarchy built by a LogFilterTreeModel.

Note: this class has a natural ordering that is inconsistent with equals.

Version:
$Revision: 1.8 $
Author:
Gregor Schmid

Constructor Summary
FilterNode(java.lang.String clazz, java.lang.String method)
          Create a new FilterNode.
FilterNode(java.lang.String clazz, java.lang.String method, int level)
          Create a new FilterNode.
 
Method Summary
 int compareTo(java.lang.Object o)
          Compare the node to some other object.
 boolean equals(java.lang.Object o)
          Check whether the FilterNode is equal to some object.
 FilterNode findChild(java.lang.String clazz, java.lang.String method)
          Return a named child node.
 java.util.List getChildren()
          Get the children of the node.
 NodeData getData()
          Get the data of the node.
 FilterNode getParent()
          Get the parent of the FilterNode.
 int hashCode()
          Generate a hash code for the FilterNode.
 boolean isExtra()
          Get the extra state of the FilterNode.
 void notify(de.qfs.lib.gui.TreeNotification notification)
          Notify the node of some change.
 void setExtra(boolean extra)
          Set the extra state of the FilterNode.
 void setLevel(int level)
          Set the level on a node.
 void setParent(FilterNode parent)
          Set the parent of the FilterNode.
 java.lang.String toString()
          Get a String representation of the node to display in the tree.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FilterNode

public FilterNode(java.lang.String clazz,
                  java.lang.String method)
Create a new FilterNode.
Parameters:
clazz - The class of the node's data.
method - The method of the node's data.

FilterNode

public FilterNode(java.lang.String clazz,
                  java.lang.String method,
                  int level)
Create a new FilterNode.
Parameters:
clazz - The class of the node's data.
method - The method of the node's data.
level - The level of the node's data.
Method Detail

setLevel

public void setLevel(int level)
Set the level on a node.
Parameters:
level - The level to set.

toString

public java.lang.String toString()
Get a String representation of the node to display in the tree.
Overrides:
toString in class java.lang.Object
Returns:
The node data's package/class or method.

findChild

public FilterNode findChild(java.lang.String clazz,
                            java.lang.String method)
Return a named child node.
Parameters:
name - The name of the node.

getChildren

public final java.util.List getChildren()
Get the children of the node.
Returns:
The children.

getData

public final NodeData getData()
Get the data of the node.
Returns:
The data.

getParent

public final FilterNode getParent()
Get the parent of the FilterNode.
Returns:
The parent of the FilterNode.

setParent

public final void setParent(FilterNode parent)
Set the parent of the FilterNode.
Parameters:
parent - The parent to set.

isExtra

public final boolean isExtra()
Get the extra state of the FilterNode.
Returns:
The extra state of the FilterNode.

setExtra

public final void setExtra(boolean extra)
Set the extra state of the FilterNode.
Parameters:
extra - The extra state to set.

notify

public void notify(de.qfs.lib.gui.TreeNotification notification)
Notify the node of some change.
Parameters:
notification - Details of the change.

hashCode

public int hashCode()
Generate a hash code for the FilterNode.
Overrides:
hashCode in class java.lang.Object
Returns:
The hash code.

equals

public boolean equals(java.lang.Object o)
Check whether the FilterNode is equal to some object.
Overrides:
equals in class java.lang.Object
Parameters:
o - The object to compare to.
Returns:
True if the object is a FilterNode and has an equal data member.

compareTo

public int compareTo(java.lang.Object o)
Compare the node to some other object.
Specified by:
compareTo in interface java.lang.Comparable
Parameters:
o - The Object to compare to. Must be a FilterNode.
Returns:
The result of comparing the nodes' data memebers.