Class CollectableNode

java.lang.Object
  extended by CollectableNode
Direct Known Subclasses:
SoundBranch, SoundNode

public abstract class CollectableNode
extends Object

Node in a sound tree.

Author:
Mark Guzdial, Barb Ericson

Constructor Summary
CollectableNode()
          No argument constructor that sets next to null
 
Method Summary
 void add(CollectableNode node)
          Add the input node after the last node in this list.
abstract  Sound collect()
          Collect all the sounds from me on
abstract  Sound collectAfter()
          Collect all the sounds from me on, but if there's processing, do it after.
 CollectableNode getNext()
          Method to get the next node
 void insertAfter(CollectableNode node)
          Insert the passed node after this node.
 CollectableNode last()
          Return the last node in the list
 void playFromMeOn()
          Play the list of sound elements after me
 void remove(CollectableNode node)
          Method to remove a node from the list, fixing links appropriately.
 void setNext(CollectableNode nextOne)
          Method to set the next node
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CollectableNode

public CollectableNode()
No argument constructor that sets next to null

Method Detail

setNext

public void setNext(CollectableNode nextOne)
Method to set the next node

Parameters:
nextOne - the next element in list

getNext

public CollectableNode getNext()
Method to get the next node

Returns:
the next node in the list

playFromMeOn

public void playFromMeOn()
Play the list of sound elements after me


collect

public abstract Sound collect()
Collect all the sounds from me on

Returns:
the collected sound

collectAfter

public abstract Sound collectAfter()
Collect all the sounds from me on, but if there's processing, do it after.

Returns:
the collected sound

remove

public void remove(CollectableNode node)
Method to remove a node from the list, fixing links appropriately.

Parameters:
node - the node to remove from the list.

insertAfter

public void insertAfter(CollectableNode node)
Insert the passed node after this node.

Parameters:
node - the node to insert after this.

last

public CollectableNode last()
Return the last node in the list

Returns:
the last node in the list

add

public void add(CollectableNode node)
Add the input node after the last node in this list.

Parameters:
node - the node to insert after this.