|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.neoworks.util.OneBlock
A one argument function block.
The value(Object) function should be overrided to provided the implementation
of the function block. This will typicaly be done inline. e.g.
new OneBlock() { public Object value(Object arg1) { return (((Boolean)arg1) == Boolean.TRUE) ? Boolean.FALSE : Boolean.TRUE } }
The above trivial example is a OneBlock that takes an argument, casts it to a
Boolean and returns the inverse of the argument. This function could be mapped
over a collection of Booleans to produce the NOT of the collection.
Field Summary | |
protected java.lang.Object |
data
Optional parametarised value |
Constructor Summary | |
OneBlock()
Default constructor |
|
OneBlock(java.lang.Object value)
Parametarised constructor. |
Method Summary | |
java.lang.Object |
value(java.lang.Object arg1)
This function should be overriden by the implementation |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected java.lang.Object data
Constructor Detail |
public OneBlock()
public OneBlock(java.lang.Object value)
value
- Value to paramatarise the OneBlockMethod Detail |
public java.lang.Object value(java.lang.Object arg1)
arg1
- The argument to the OneBlock
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |