public class FeatureFrame extends java.lang.Object implements java.io.Serializable, java.lang.Comparable<FeatureFrame>
Constructor and Description |
---|
FeatureFrame(double startTimeMS,
double endTimeMS)
Instantiates a new FeatureFrame.
|
Modifier and Type | Method and Description |
---|---|
void |
add(java.lang.String s,
java.lang.Object f)
Adds a set of features with the given name.
|
int |
compareTo(FeatureFrame other)
Returns -1, 0 or 1 as required by Java's
Comparator interface, using the frame's start time as the thing to compare. |
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.
|
int |
numFeatures() |
void |
setEndTimeMS(double endTimeMS)
Sets the end time in milliseconds.
|
void |
setStartTimeMS(double startTimeMS)
Sets the start time in milliseconds.
|
java.lang.String |
toString() |
public FeatureFrame(double startTimeMS, double endTimeMS)
startTimeMS
- the start time in milliseconds.endTimeMS
- the end time in milliseconds.public double getStartTimeMS()
public void setStartTimeMS(double startTimeMS)
startTimeMS
- the new start time in milliseconds.public double getEndTimeMS()
public void setEndTimeMS(double endTimeMS)
endTimeMS
- the new end time in milliseconds.public void add(java.lang.String s, java.lang.Object f)
s
- the name used to identify the feature set.f
- the features.public java.lang.Object get(java.lang.String s)
s
- the name.public java.util.Enumeration<java.lang.String> keys()
public boolean containsTime(double timeMS)
timeMS
- the time in milliseconds.public java.lang.String toString()
toString
in class java.lang.Object
public int compareTo(FeatureFrame other)
Comparator
interface, using the frame's start time as the thing to compare.compareTo
in interface java.lang.Comparable<FeatureFrame>
other
- the FeatureFrame to compare to.public int numFeatures()