edu.cmu.sphinx.frontend
Class DoubleData

java.lang.Object
  extended byedu.cmu.sphinx.frontend.DoubleData
All Implemented Interfaces:
java.lang.Cloneable, Data

public class DoubleData
extends java.lang.Object
implements Data, java.lang.Cloneable

A Data object that holds data of primitive type double.


Constructor Summary
DoubleData(double[] values, int sampleRate, long collectTime, long firstSampleNumber)
          Constructs a Data object with the given values, collect time, and first sample number.
 
Method Summary
 java.lang.Object clone()
          Returns a clone of this Data object.
 long getCollectTime()
          Returns the time in milliseconds at which the audio data is collected.
 long getFirstSampleNumber()
          Returns the position of the first sample in the original data.
 int getSampleRate()
          Returns the sample rate of the data.
 double[] getValues()
          Returns the values of this DoubleData object.
 java.lang.String toString()
          Returns a string that describes this DoubleData.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DoubleData

public DoubleData(double[] values,
                  int sampleRate,
                  long collectTime,
                  long firstSampleNumber)
Constructs a Data object with the given values, collect time, and first sample number.

Parameters:
values - the data values
sampleRate - the sample rate of the data
collectTime - the time at which this data is collected
firstSampleNumber - the position of the first sample in the original data
Method Detail

toString

public java.lang.String toString()
Returns a string that describes this DoubleData.

Returns:
a string that describes this DoubleData

getValues

public double[] getValues()
Returns the values of this DoubleData object.

Returns:
the values

getSampleRate

public int getSampleRate()
Returns the sample rate of the data.

Returns:
the sample rate of the data

getFirstSampleNumber

public long getFirstSampleNumber()
Returns the position of the first sample in the original data. The very first sample number is zero.

Returns:
the position of the first sample in the original data

getCollectTime

public long getCollectTime()
Returns the time in milliseconds at which the audio data is collected.

Returns:
the difference, in milliseconds, between the time the audio data is collected and midnight, January 1, 1970

clone

public java.lang.Object clone()
Returns a clone of this Data object.

Returns:
a clone of this data object