|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object sky.monome.event.GenericListenerWithArguments
public abstract class GenericListenerWithArguments
Generic listener that can have internal arguments.
Field Summary | |
---|---|
protected java.lang.Object[] |
arguments
Arguments of this listener. |
Constructor Summary | |
---|---|
protected |
GenericListenerWithArguments(java.lang.Object... arguments)
Constructs a generic listener with specified arguments. |
Method Summary | ||
---|---|---|
protected
|
getArgument(java.lang.Class<T> clazz,
int index)
Returns the argument at the specified index. |
|
protected
|
getArgument(int index)
Returns the argument at the specified index. |
|
protected java.lang.Object[] |
getArguments()
Returns an array of arguments. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected final java.lang.Object[] arguments
Constructor Detail |
---|
protected GenericListenerWithArguments(java.lang.Object... arguments)
arguments
- Arguments of this generic listener.Method Detail |
---|
protected java.lang.Object[] getArguments()
protected <T> T getArgument(int index)
T
- Type of the returned argument.index
- Index of the argument.
java.lang.ArrayIndexOutOfBoundsException
- When the index is out of bounds.
java.lang.ClassCastException
- When the argument can't be typed to the specified type.protected <T> T getArgument(java.lang.Class<T> clazz, int index)
T
- Type of the returned argument.clazz
- Class object that denotes the type of the returned argument.index
- Index of the argument.
java.lang.ArrayIndexOutOfBoundsException
- When the index is out of bounds.
java.lang.ClassCastException
- When the argument can't be typed to the specified type.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |