weka.filters.supervised.attribute.gpattributegeneration
Class Node<T>

java.lang.Object
  extended by weka.filters.supervised.attribute.gpattributegeneration.Node<T>
Direct Known Subclasses:
GeneNode

public class Node<T>
extends java.lang.Object

Defines a node and its children (if the node is a function) Ported from Luke Devonshire's C# project

Author:
Luke Devonshire

Constructor Summary
Node()
          Creates an empty node
Node(T data)
          Creates a node with the given data
Node(T data, GeneNodeList<T> children)
          Creates a node with the given data and children
 
Method Summary
 GeneNodeList<T> getChildren()
          Returns the children
 T getValue()
          Returns the value of the node
 void setChildren(GeneNodeList<T> children)
          Sets the children
 void setValue(T data)
          Set the value of the node
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Node

public Node()
Creates an empty node


Node

public Node(T data)
Creates a node with the given data

Parameters:
data - Data to create node with

Node

public Node(T data,
            GeneNodeList<T> children)
Creates a node with the given data and children

Parameters:
data - Data to create node with
children - Children to also add to the node
Method Detail

getValue

public T getValue()
Returns the value of the node

Returns:
The value of the node

setValue

public void setValue(T data)
Set the value of the node

Parameters:
data - The value

getChildren

public GeneNodeList<T> getChildren()
Returns the children

Returns:
The Node's children

setChildren

public void setChildren(GeneNodeList<T> children)
Sets the children

Parameters:
children - Children to set for the node