|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--xxl.cursors.Mapper
Tha Mapper maps an input-Object-array to an output-Object with a given Function. The Mapper takes n iterators as its input and takes them as parameters to a given n-ary function. Important: The function of the Mapper is called with an Object-array.
| Field Summary | |
protected boolean |
allowPartialInput
|
protected java.lang.Object[] |
arguments
|
protected Cursor[] |
cursors
|
protected Function |
function
|
protected boolean |
supportsPeek
|
| Constructor Summary | |
Mapper(java.util.Iterator[] iterators)
Creates a new Mapper. |
|
Mapper(java.util.Iterator[] iterators,
Function function)
Creates a new Mapper. |
|
Mapper(java.util.Iterator[] iterators,
Function function,
boolean allowPartialInput)
Creates a new Mapper. |
|
Mapper(java.util.Iterator iterator,
Function function)
Creates a new Mapper. |
|
Mapper(java.util.Iterator iterator0,
java.util.Iterator iterator1)
Creates a new Mapper. |
|
Mapper(java.util.Iterator iterator0,
java.util.Iterator iterator1,
Function function)
Creates a new Mapper. |
|
| Method Summary | |
void |
close()
Closes the Cursor. |
boolean |
hasNext()
Returns true if the iteration has more elements. |
java.lang.Object |
next()
Returns the next element in the iteration. |
java.lang.Object |
peek()
Shows the next element in the iteration without removing it. |
void |
remove()
Removes from the underlying collection the last element returned by the iterator (optional operation). |
void |
reset()
Resets the Cursor to its initial state. |
boolean |
supportsPeek()
Returns true if the peek operation is supported by this PeekIterator. |
void |
update(java.lang.Object object)
Replaces the object that was returned by the last call to next() or peek(). |
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
| Field Detail |
protected Cursor[] cursors
protected Function function
protected java.lang.Object[] arguments
protected boolean supportsPeek
protected boolean allowPartialInput
| Constructor Detail |
public Mapper(java.util.Iterator[] iterators,
Function function,
boolean allowPartialInput)
iterators - the input-Iteratorsfunction - the Function used to map elementsallowPartialInput - true iff TODO
public Mapper(java.util.Iterator[] iterators,
Function function)
iterators - the input-Iteratorsfunction - the Function used to map elementspublic Mapper(java.util.Iterator[] iterators)
iterators - the input-Iterators
public Mapper(java.util.Iterator iterator,
Function function)
iterator - the input-Iteratorfunction - the Function used to map elements
public Mapper(java.util.Iterator iterator0,
java.util.Iterator iterator1)
iterator0 - the first input-Iteratoriterator1 - the second input-Iterator
public Mapper(java.util.Iterator iterator0,
java.util.Iterator iterator1,
Function function)
iterator0 - the first input-Iteratoriterator1 - the second input-Iteratorfunction - the Function used to map elements| Method Detail |
public void close()
public boolean hasNext()
public java.lang.Object next()
throws java.util.NoSuchElementException
public java.lang.Object peek()
throws java.util.NoSuchElementException,
java.lang.UnsupportedOperationException
public void remove()
throws java.lang.UnsupportedOperationException
public void reset()
throws java.lang.UnsupportedOperationException
public boolean supportsPeek()
public void update(java.lang.Object object)
throws java.lang.UnsupportedOperationException
object - the object that replaces the object returned
by the last call to next() or peek()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||