Class JourneySat.Node

Object
   |
   +--JourneySat.Node

class JourneySat.Node


This class implements the node of a tree. Every node has a link to its parent, previous sibling, next sibling, first child and last child.
Defined in travel.js

See:


Field Summary
 JourneySat.Node firstChild
          Reference to the first child of this node
 JourneySat.Node lastChild
          Reference to the last child of this node
 Object nextSibling
          Reference to the sibling of this node which is one position closer to parent.lastChild in the siblings list
 JourneySat.Node parent
          Reference to the parent of this node
 JourneySat.Node prevSibling
          Reference to the sibling of this node which is one position closer to parent.firstChild in the siblings list
 Object value
          The value of this node.
 
Constructor Summary
JourneySat.Node ()
           
 
Method Summary
 Object addChild(value)
           Creates a new node and adds it to the tree as a child of this node.
 Object insertSibling(value)
           Creates a new node and adds it to the tree as a sibling of this node.
 void remove()
           Removes a node from the tree.
 void swapNextSibling()
           Moves this node one position closer to parent.lastChild in its siblings list.
 void swapPrevSibling()
           Moves this node one position closer to parent.firstChild in its siblings list.
 String toString()
           Returns a string representation of this node, in the format this.value = , this.prevSibling.value = , this.nextSibling.value = , this.firstChild.value = , this.lastChild.value =

Field Detail

firstChild

JourneySat.Node firstChild

lastChild

JourneySat.Node lastChild

nextSibling

Object nextSibling

parent

JourneySat.Node parent

prevSibling

JourneySat.Node prevSibling

value

Object value

Constructor Detail

JourneySat.Node

JourneySat.Node()

Method Detail

addChild

Object addChild(value)

insertSibling

Object insertSibling(value)

remove

void remove()

swapNextSibling

void swapNextSibling()

swapPrevSibling

void swapPrevSibling()

toString

String toString()


Documentation generated by JSDoc on Thu Oct 20 14:28:29 2005