it.unipd.dei.ims.nestor.experiment.tree
Class Node

java.lang.Object
  extended by it.unipd.dei.ims.nestor.experiment.tree.Node

public class Node
extends java.lang.Object

This interface defines the node of a tree.

Author:
gianmariasilvello

Constructor Summary
Node(java.lang.Integer parent, java.util.ArrayList<java.lang.Integer> children, java.util.ArrayList<java.lang.Integer> elements)
           
 
Method Summary
 java.util.ArrayList<java.lang.Integer> getChildren()
          Return the list of children of this node.
 java.util.ArrayList<java.lang.Integer> getElements()
          Return the elements of this node.
 java.lang.Integer getParent()
          Return the father node of this node.
 java.util.ArrayList<java.lang.Integer> setChildren(java.util.ArrayList<java.lang.Integer> children)
          Set a new list of children and return it.
 java.util.ArrayList<java.lang.Integer> setElements(java.util.ArrayList<java.lang.Integer> elements)
          Set a new list of elements.
 java.lang.Integer setParent(java.lang.Integer parent)
          Set the new parent of this node and return it.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Node

public Node(java.lang.Integer parent,
            java.util.ArrayList<java.lang.Integer> children,
            java.util.ArrayList<java.lang.Integer> elements)
Method Detail

getChildren

public java.util.ArrayList<java.lang.Integer> getChildren()
Return the list of children of this node.

Returns:
the list of integers representing the identifiers of the children of this node.

setChildren

public java.util.ArrayList<java.lang.Integer> setChildren(java.util.ArrayList<java.lang.Integer> children)
Set a new list of children and return it.

Parameters:
children - the new list of children.
Returns:
the new setted list of children.

getParent

public java.lang.Integer getParent()
Return the father node of this node.

Returns:
the integer identifying the father of this node.

setParent

public java.lang.Integer setParent(java.lang.Integer parent)
Set the new parent of this node and return it.

Parameters:
parent - the new parent node.
Returns:
the newly set parent node.

getElements

public java.util.ArrayList<java.lang.Integer> getElements()
Return the elements of this node.

Returns:
the list of identifiers of the elements of this node.

setElements

public java.util.ArrayList<java.lang.Integer> setElements(java.util.ArrayList<java.lang.Integer> elements)
Set a new list of elements.

Parameters:
elements - The new list of elements to be set.
Returns:
the new set list of elements.