provided.util
Class ABCInstrument

java.lang.Object
  extended by provided.util.ABCInstrument

public class ABCInstrument
extends java.lang.Object

Represents an instrument as a name and an integer value

Author:
swong

Field Summary
private  java.lang.String name
          The name of the instrument
private  int value
          The integer value associated with the instrument.
 
Constructor Summary
ABCInstrument(java.lang.String name, int value)
          Constructor for the class
 
Method Summary
 java.lang.String getName()
          Accessor for the name of the instrument
 int getValue()
          Accessor for the integer value associated with this instrument.
 java.lang.String toString()
          Returns the string representation of this class
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

name

private java.lang.String name
The name of the instrument


value

private int value
The integer value associated with the instrument.

Constructor Detail

ABCInstrument

public ABCInstrument(java.lang.String name,
                     int value)
Constructor for the class

Parameters:
name - the name of the instrument
value - the instrument's associated integer value
Method Detail

getName

public java.lang.String getName()
Accessor for the name of the instrument

Returns:
the name of the instrument

getValue

public int getValue()
Accessor for the integer value associated with this instrument.

Returns:
the integer value for this instrument

toString

public java.lang.String toString()
Returns the string representation of this class

Overrides:
toString in class java.lang.Object
Returns:
"name: value"