net.beadsproject.beads.analysis
Class FeatureFrame

java.lang.Object
  extended by net.beadsproject.beads.analysis.FeatureFrame
All Implemented Interfaces:
java.io.Serializable

public class FeatureFrame
extends java.lang.Object
implements java.io.Serializable

A FeatureFrame stores a set of features for a single chunk of audio data.

Author:
ollie
See Also:
Serialized Form

Constructor Summary
FeatureFrame(double startTimeMS, double endTimeMS)
          Instantiates a new FeatureFrame.
 
Method Summary
 void add(java.lang.String s, java.lang.Object f)
          Adds a set of features with the given name.
 boolean containsTime(double timeMS)
          Checks whether the given time in milliseconds is within this frame.
 java.lang.Object get(java.lang.String s)
          Gets the features for the given name.
 double getEndTimeMS()
          Gets the end time in milliseconds.
 double getStartTimeMS()
          Gets the start time in milliseconds.
 java.util.Enumeration<java.lang.String> keys()
          Returns an Enumeration over the set of names used to identify the features.
 void setEndTimeMS(double endTimeMS)
          Sets the end time in milliseconds.
 void setStartTimeMS(double startTimeMS)
          Sets the start time in milliseconds.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FeatureFrame

public FeatureFrame(double startTimeMS,
                    double endTimeMS)
Instantiates a new FeatureFrame.

Parameters:
startTimeMS - the start time in milliseconds.
endTimeMS - the end time in milliseconds.
Method Detail

getStartTimeMS

public double getStartTimeMS()
Gets the start time in milliseconds.

Returns:
the start time in milliseconds.

setStartTimeMS

public void setStartTimeMS(double startTimeMS)
Sets the start time in milliseconds.

Parameters:
startTimeMS - the new start time in milliseconds.

getEndTimeMS

public double getEndTimeMS()
Gets the end time in milliseconds.

Returns:
the end time in milliseconds.

setEndTimeMS

public void setEndTimeMS(double endTimeMS)
Sets the end time in milliseconds.

Parameters:
endTimeMS - the new end time in milliseconds.

add

public void add(java.lang.String s,
                java.lang.Object f)
Adds a set of features with the given name.

Parameters:
s - the name used to identify the feature set.
f - the features.

get

public java.lang.Object get(java.lang.String s)
Gets the features for the given name.

Parameters:
s - the name.
Returns:
the features.

keys

public java.util.Enumeration<java.lang.String> keys()
Returns an Enumeration over the set of names used to identify the features.

Returns:
Enumeration over feature names.

containsTime

public boolean containsTime(double timeMS)
Checks whether the given time in milliseconds is within this frame.

Parameters:
timeMS - the time in milliseconds.
Returns:
true the frame contains this point in time.

toString

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