music
Class Header

java.lang.Object
  extended by music.Header
All Implemented Interfaces:
IPhrase

public class Header
extends java.lang.Object
implements IPhrase

An abc Header. Headers are identified by a one character "id" and can have an arbitrary string value.


Field Summary
private  java.lang.String _id
           
private  java.lang.String _value
           
 
Constructor Summary
Header(java.lang.String id, java.lang.String value)
          Create a header out of an id and value
 
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.
 java.lang.String getID()
           
 java.lang.String getValue()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

_id

private java.lang.String _id

_value

private java.lang.String _value
Constructor Detail

Header

public Header(java.lang.String id,
              java.lang.String value)
Create a header out of an id and value

Parameters:
id - - one character corresponding to the abc header name
value - - arbitrary string value of the header
Method Detail

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.

getID

public java.lang.String getID()
Returns:
the _id

getValue

public java.lang.String getValue()
Returns:
the _value

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object