Class Sample

java.lang.Object
  extended by Sample

public class Sample
extends java.lang.Object

Class that represents a sample
Copyright Georgia Institute of Technology 2006


Constructor Summary
Sample(Sound aSound, int index)
          Constructor that takes a sound and an index
 
Method Summary
 Sound getSound()
          Method to get this sample's sound object
 int getValue()
          Method to get the sample value
 void setValue(double newValue)
          Method to set the sample value
 void setValue(int newValue)
          Method to set the sample value
 java.lang.String toString()
          Obtains a string representation of this Sample
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Sample

public Sample(Sound aSound,
              int index)
Constructor that takes a sound and an index

Parameters:
aSound - the sound
index - the index
Method Detail

toString

public java.lang.String toString()
Obtains a string representation of this Sample

Overrides:
toString in class java.lang.Object
Returns:
a String representation of this Sample

getSound

public Sound getSound()
Method to get this sample's sound object

Returns:
a sound object

getValue

public int getValue()
             throws SoundException
Method to get the sample value

Returns:
a sample value
Throws:
SoundException

setValue

public void setValue(int newValue)
              throws SoundException
Method to set the sample value

Parameters:
newValue - the new value to store
Throws:
SoundException

setValue

public void setValue(double newValue)
              throws SoundException
Method to set the sample value

Parameters:
newValue - the new value to store
Throws:
SoundException