org.infinispan.query.impl
Class AbstractIterator

java.lang.Object
  extended by org.infinispan.query.impl.AbstractIterator
All Implemented Interfaces:
Iterator<Object>, ListIterator<Object>, QueryIterator
Direct Known Subclasses:
DistributedIterator, EagerIterator, LazyIterator

public abstract class AbstractIterator
extends Object
implements QueryIterator

This is the abstract superclass of the 2 iterators. Since some of the methods have the same implementations they have been put onto a separate class.

Since:
4.0
Author:
Navin Surtani
See Also:
EagerIterator, LazyIterator

Field Summary
protected  Object[] buffer
           
protected  int bufferIndex
           
protected  AdvancedCache<?,?> cache
           
protected  int fetchSize
           
protected  int first
           
protected  int index
           
protected  int max
           
 
Constructor Summary
AbstractIterator()
           
 
Method Summary
 void afterFirst()
          Jumps to the one-after-the-first result
 void beforeLast()
          Jumps to the one-before-the-last result
 void first()
          Jumps to the first result
 boolean hasNext()
           
 boolean hasPrevious()
           
 boolean isAfterFirst()
           
 boolean isBeforeLast()
           
 boolean isFirst()
           
 boolean isLast()
           
 void last()
          Jumps to the last result
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.infinispan.query.QueryIterator
close, jumpToResult
 
Methods inherited from interface java.util.ListIterator
add, next, nextIndex, previous, previousIndex, remove, set
 

Field Detail

buffer

protected Object[] buffer

cache

protected AdvancedCache<?,?> cache

index

protected int index

bufferIndex

protected int bufferIndex

max

protected int max

first

protected int first

fetchSize

protected int fetchSize
Constructor Detail

AbstractIterator

public AbstractIterator()
Method Detail

first

public void first()
Description copied from interface: QueryIterator
Jumps to the first result

Specified by:
first in interface QueryIterator

last

public void last()
Description copied from interface: QueryIterator
Jumps to the last result

Specified by:
last in interface QueryIterator

afterFirst

public void afterFirst()
Description copied from interface: QueryIterator
Jumps to the one-after-the-first result

Specified by:
afterFirst in interface QueryIterator

beforeLast

public void beforeLast()
Description copied from interface: QueryIterator
Jumps to the one-before-the-last result

Specified by:
beforeLast in interface QueryIterator

isFirst

public boolean isFirst()
Specified by:
isFirst in interface QueryIterator
Returns:
true if the current result is the first

isLast

public boolean isLast()
Specified by:
isLast in interface QueryIterator
Returns:
true if the current result is the last

isAfterFirst

public boolean isAfterFirst()
Specified by:
isAfterFirst in interface QueryIterator
Returns:
true if the current result is one after the first

isBeforeLast

public boolean isBeforeLast()
Specified by:
isBeforeLast in interface QueryIterator
Returns:
true if the current result is one before the last

hasPrevious

public boolean hasPrevious()
Specified by:
hasPrevious in interface ListIterator<Object>

hasNext

public boolean hasNext()
Specified by:
hasNext in interface Iterator<Object>
Specified by:
hasNext in interface ListIterator<Object>

-->

Copyright © 2012 JBoss, a division of Red Hat. All Rights Reserved.