|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object sky.monome.util.OSCMessageDigester
public class OSCMessageDigester
Digester for messages provided by the OSC protocol. With a digester, which treats the message, you can easily access to the instruction and arguments.
Field Summary | |
---|---|
protected java.lang.Object[] |
arguments
Array of arguments included in the message digested by this digester. |
protected java.lang.String |
instruction
Instruction included in the message digested by this digester. |
Constructor Summary | |
---|---|
OSCMessageDigester(com.illposed.osc.OSCMessage message)
Constructs a message digester with the specified raw message. |
Method Summary | ||
---|---|---|
|
getArgument(java.lang.Class<T> clazz,
int index)
Returns the argument at the specified index included in the message digested by this digester. |
|
|
getArgument(int index)
Returns the argument at the specified index included in the message digested by this digester. |
|
java.lang.String |
getInstruction()
Returns the instruction included in the message digested by this digester. |
|
java.lang.String |
toString()
Returns a string representation of this message digester. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected final java.lang.String instruction
protected final java.lang.Object[] arguments
Constructor Detail |
---|
public OSCMessageDigester(com.illposed.osc.OSCMessage message)
message
- Raw message which must be digested by this digester.Method Detail |
---|
public java.lang.String getInstruction()
public <T> T getArgument(int index)
T
- Type of the returned argument.index
- Index of the argument in the array of arguments.
java.lang.ArrayIndexOutOfBoundsException
- When the index is not valid for the array of arguments.
java.lang.ClassCastException
- When the argument can't be typed to the specified type.public <T> T getArgument(java.lang.Class<T> clazz, int index)
T
- Type of the returned argument.clazz
- Class object which indicates the type of the returned argument.index
- Index of the argument in the array of arguments.
java.lang.ArrayIndexOutOfBoundsException
- When the index is not valid for the array of arguments.
java.lang.ClassCastException
- When the argument can't be typed to the specified type.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 |