Package heronarts.lx.osc
Class OscFloat
java.lang.Object
heronarts.lx.osc.OscFloat
- All Implemented Interfaces:
OscArgument
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintGets the number of bytes used by this argument uses in its encoded representation.charReturns the type tag used to encode this argumentfloatgetValue()voidserialize(ByteBuffer buffer) Serializes this argument to a buffersetValue(float value) booleandoubletoDouble()floattoFloat()inttoInt()Gets an integer value of this argumenttoString()
-
Constructor Details
-
OscFloat
public OscFloat(float value)
-
-
Method Details
-
setValue
-
getValue
public float getValue() -
getByteLength
public int getByteLength()Description copied from interface:OscArgumentGets the number of bytes used by this argument uses in its encoded representation.- Specified by:
getByteLengthin interfaceOscArgument- Returns:
- Number of bytes of data this argument consumes
-
getTypeTag
public char getTypeTag()Description copied from interface:OscArgumentReturns the type tag used to encode this argument- Specified by:
getTypeTagin interfaceOscArgument- Returns:
- Type-tag character for this argument
-
toString
-
serialize
Description copied from interface:OscArgumentSerializes this argument to a buffer- Specified by:
serializein interfaceOscArgument- Parameters:
buffer- ByteByffer to write to
-
toInt
public int toInt()Description copied from interface:OscArgumentGets an integer value of this argument- Specified by:
toIntin interfaceOscArgument- Returns:
- Integer value of this argument
-
toFloat
public float toFloat()- Specified by:
toFloatin interfaceOscArgument
-
toDouble
public double toDouble()- Specified by:
toDoublein interfaceOscArgument
-
toBoolean
public boolean toBoolean()- Specified by:
toBooleanin interfaceOscArgument
-