|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectmondrian.calc.impl.AbstractTupleList.AbstractTupleListIterator
protected class AbstractTupleList.AbstractTupleListIterator
Implementation of TupleIterator for
ArrayTupleList.
Based upon AbstractList.Itr, but with concurrent modification checking
removed.
| Field Summary | |
|---|---|
(package private) int |
cursor
Index of element to be returned by subsequent call to next. |
(package private) int |
lastRet
Index of element returned by most recent call to next or previous. |
| Constructor Summary | |
|---|---|
protected |
AbstractTupleList.AbstractTupleListIterator()
|
| Method Summary | |
|---|---|
List<Member> |
current()
Returns the tuple that this cursor is positioned on. |
void |
currentToArray(Member[] members,
int offset)
Writes the member(s) of the next tuple to a given offset in an array. |
boolean |
forward()
Moves the iterator forward one position. |
int |
getArity()
Returns the number of members in each tuple. |
boolean |
hasNext()
|
Member |
member(int column)
|
List<Member> |
next()
|
void |
remove()
|
void |
setContext(Evaluator evaluator)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
int cursor
int lastRet
| Constructor Detail |
|---|
protected AbstractTupleList.AbstractTupleListIterator()
| Method Detail |
|---|
public boolean hasNext()
hasNext in interface Iterator<List<Member>>public List<Member> next()
next in interface Iterator<List<Member>>public boolean forward()
TupleCursorReturns false only when end of data has been reached.
Similar to calling the Iterator methods
Iterator.hasNext() followed by
Iterator.next() but
does not construct an object, and is therefore cheaper.
If you want to use an Iterator, see TupleIterator.
forward in interface TupleCursorpublic List<Member> current()
TupleCursorThis method never returns null, and may safely be called multiple times (or not all) for each position in the iteration.
Invalid to call this method when the cursor is has not been
positioned, for example, if TupleCursor.forward() has not been called or
if the most recent call to forward returned false.
current in interface TupleCursor
public void currentToArray(Member[] members,
int offset)
TupleCursorThis method saves the overhead of a memory allocation when the
resulting tuple will be written immediately to an array. The effect of
currentToArray(members, 0) is the same as calling
current().toArray(members).
Before calling this method, you must position the iterator at a valid position. Typically you would call hasNext followed by next; or forward.
currentToArray in interface TupleCursormembers - Membersoffset - Offset in the array to write topublic int getArity()
TupleCursor
getArity in interface TupleCursorpublic void remove()
remove in interface Iterator<List<Member>>public void setContext(Evaluator evaluator)
setContext in interface TupleCursorpublic Member member(int column)
member in interface TupleCursor
|
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||