|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectpmlib.PMLFloat
public class PMLFloat
PMLFloat Class
The PMLFloat object allows the storage of a float value alongside a String identifier.
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 | |
---|---|
PMLFloat(java.lang.String t,
float v)
Create a new object instance with the specified tag and value with no value ramping |
|
PMLFloat(java.lang.String t,
float v,
int r)
Create a new object instance with the specified tag, value and ramp duration |
Method Summary | |
---|---|
boolean |
booleanValue()
Return the stored value as a boolean |
float |
floatValue()
Return the stored value as a float |
PMLRange |
getRange()
Return the output range for this object |
boolean |
hasChanged()
Return true if the value of this object differs from the previous set value |
boolean |
hasTag(java.lang.String t)
Return true if the object tag matches that specified |
int |
intValue()
Return the stored value as a rounded integer |
void |
set(float v)
Set the value of this object |
void |
set(int v)
Set the value of this object |
void |
setRamp(int r)
Set the ramp duration |
void |
setRange(PMLRange r)
Define the output range of this object |
java.lang.String |
tag()
Return the stored tag |
PMLEvent |
toEvent(int f)
Return a PMLEvent object with the tag and value of this object instance and the frame number specified |
java.lang.String |
toString()
Return the PMLFloat values as a String |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public PMLFloat(java.lang.String t, float v)
t
- tagv
- valuepublic PMLFloat(java.lang.String t, float v, int r)
t
- tagv
- valuer
- ramp duration (ms)Method Detail |
---|
public boolean booleanValue()
If a value range is specified, true will be returned if the stored value is greater than the midpoint of the range. If no value range is specified, true will be returned if the stored value is greater than zero.
public int intValue()
public float floatValue()
public PMLEvent toEvent(int f)
f
- frame
public void set(int v)
v
- valuepublic void set(float v)
v
- valuepublic void setRamp(int r)
r
- ramp duration (ms)public void setRange(PMLRange r)
If the specified object is null, the output will not be limited.
public PMLRange getRange()
If this object has no specified range, null will be returned.
public java.lang.String tag()
public boolean hasTag(java.lang.String t)
t
- tag
public boolean hasChanged()
The value is deemed not to have changed if the difference between current and previous values is less than 1*10^-10.
public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |