music
Class NESeqList

java.lang.Object
  extended by music.NESeqList
All Implemented Interfaces:
IPhrase, ISeqList

public class NESeqList
extends java.lang.Object
implements ISeqList

A non-empty sequence list.


Field Summary
private  IPhrase _first
           
private  ISeqList _rest
           
private  IPhraseVisitor toStringAlgo
          toString algo for rest
 
Constructor Summary
NESeqList(IPhrase first, ISeqList rest)
          Cons an IPhrase to a Sequence List.
 
Method Summary
 java.lang.Object execute(IPhraseVisitor algo, java.lang.Object... params)
          Executes (accepts) the visitor, calling the case associated with this host's index value.
 IPhrase getFirst()
           
 ISeqList getRest()
           
 java.lang.String toString()
          Run a visitor over the list to convert it to a String
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

_first

private IPhrase _first

_rest

private ISeqList _rest

toStringAlgo

private IPhraseVisitor toStringAlgo
toString algo for rest

Constructor Detail

NESeqList

public NESeqList(IPhrase first,
                 ISeqList rest)
Cons an IPhrase to a Sequence List.

Method Detail

getFirst

public IPhrase getFirst()
Returns:
the IPhrase that is the first element of the sequence list

getRest

public ISeqList getRest()
Returns:
the rest of the sequence list

execute

public java.lang.Object execute(IPhraseVisitor algo,
                                java.lang.Object... params)
Description copied from interface: IPhrase
Executes (accepts) the visitor, calling the case associated with this host's index value.

Specified by:
execute in interface IPhrase
Parameters:
algo - The visitor to execute
params - The input parameters supplied to the algo when its appropriate case is called.
Returns:
The return value from executing the appropriate case on the visitor.

toString

public java.lang.String toString()
Run a visitor over the list to convert it to a String

Overrides:
toString in class java.lang.Object