|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectmessif.objects.util.AbstractObjectIterator<T>
messif.buckets.index.SearchAbstractObjectIterator<T>
T - the class of the iterated objectspublic class SearchAbstractObjectIterator<T extends LocalAbstractObject>
Provides a bridge between Search and AbstractObjectIterator.
| Field Summary | |
|---|---|
protected int |
hasNext
Flag for remembering if next() has been called on search and its result |
protected Search<T> |
search
Wrapped search instance |
| Constructor Summary | |
|---|---|
SearchAbstractObjectIterator(Search<T> search)
Creates a new instance of SearchAbstractObjectIterator for the specified Search instance. |
|
SearchAbstractObjectIterator(Search<T> search,
int limit)
Creates a new instance of SearchAbstractObjectIterator for the specified Search instance. |
|
| Method Summary | |
|---|---|
int |
getCount()
Returns the current number of iterations. |
T |
getCurrentObject()
Returns an object returned by the last call to Iterator.next(). |
int |
getLimit()
Returns the maximal number of iterations. |
boolean |
hasNext()
|
boolean |
isLimitReached()
Returns true if the current number of iterations has reached its maximum. |
T |
next()
|
void |
remove()
|
| Methods inherited from class messif.objects.util.AbstractObjectIterator |
|---|
getCurrentObjectID, getMatchingObjects, getMatchingObjects, getMatchingObjects, getMatchingObjects, getObjectByAnyLocator, getObjectByData, getObjectByID, getObjectByLocator, getObjectByPosition, getRandomObject, getRandomObjects, nextObjectID, provideObjects |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected final Search<T extends LocalAbstractObject> search
protected int hasNext
search and its result
| Constructor Detail |
|---|
public SearchAbstractObjectIterator(Search<T> search,
int limit)
Search instance.
search - the Search instance to wrap by this iteratorlimit - limit the number of iterations (zero means unlimited)public SearchAbstractObjectIterator(Search<T> search)
Search instance.
search - the Search instance to wrap by this iterator| Method Detail |
|---|
public int getCount()
public int getLimit()
public final boolean isLimitReached()
public T getCurrentObject()
AbstractObjectIteratorIterator.next().
getCurrentObject in class AbstractObjectIterator<T extends LocalAbstractObject>Iterator.next()public boolean hasNext()
public T next()
throws java.util.NoSuchElementException
java.util.NoSuchElementException
public void remove()
throws java.lang.UnsupportedOperationException
java.lang.UnsupportedOperationException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||