|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectpmlib.PMLEvent
public class PMLEvent
PMLEvent Class
The PMLEvent object allows an array of floating point values to be stored alongside a String identifier and frame number.
This library is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along with this library. If not, see http://www.gnu.org/licenses/.
Constructor Summary | |
---|---|
PMLEvent(java.lang.String t,
int f,
float[] v)
Create a new object instance with the specified variables |
Method Summary | |
---|---|
int |
compareTo(java.lang.Object obj)
Implementation of the Comparable interface - objects are compared based on their frame numbers |
PMLEvent |
copy()
Return a copy of this object |
int |
frame()
Return the frame number |
static PMLEvent |
fromString(java.lang.String s)
Create and return an SeqEvent object from a string in the format 'frame tag var_0 var_1 ... |
boolean |
hasTag(java.lang.String t)
Return true if the tag of this object matches that specified |
boolean |
hasVars(float[] v)
Return true if the variables of this object match those specified |
void |
setFrame(int f)
Set the frame number |
java.lang.String |
tag()
Return the event tag string |
java.lang.String |
toString()
Return the contents of the object as a string in the format 'frame tag var_0 var_1 ... |
float[] |
vars()
Return the stored values as an array of floats |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public PMLEvent(java.lang.String t, int f, float[] v)
t
- tagf
- framev
- valuesMethod Detail |
---|
public java.lang.String tag()
public float[] vars()
public void setFrame(int f)
f
- frame numberpublic int frame()
public java.lang.String toString()
toString
in class java.lang.Object
public static PMLEvent fromString(java.lang.String s)
If the frame or variable values cannot be parsed into integer and float values respectively a null value will be returned.
s
- string
public int compareTo(java.lang.Object obj)
compareTo
in interface java.lang.Comparable
obj
- object to compare with
public boolean hasTag(java.lang.String t)
t
- tag
public boolean hasVars(float[] v)
v
- variables
public PMLEvent copy()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |