OutputType - the class type that is returned for each
fetched element.InputType - the class type the stored entities have. It
is necessary that the input type is the same or a subclass
of the type specified as output.public class BerkeleyDBWiktionaryIterator<OutputType,InputType extends OutputType> extends WiktionaryIterator<OutputType>
WiktionaryIterator for the use of a
Berkeley DB EntityCursor as a source of elements. The cursor
is passed to the constructor and automatically closed upon manually
termination of the iteration or after all elements have been traversed.
Additionally, a hotspot is provided to react on the return of an
element of the cursor to, e.g., initialize the entity. It is
possible to convert the stored entity to a more general type
using different type parameters.| Modifier and Type | Field and Description |
|---|---|
protected com.sleepycat.persist.EntityCursor<InputType> |
cursor |
protected BerkeleyDBWiktionaryEdition |
edition |
closed, nextValue| Constructor and Description |
|---|
BerkeleyDBWiktionaryIterator(BerkeleyDBWiktionaryEdition edition,
com.sleepycat.persist.EntityCursor<InputType> cursor)
Initializes the iterator for the specified cursor.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
doClose()
Hotspot that is invoked after closing the iteration, i.e.
|
protected OutputType |
fetchNext()
Hotspot for fetching the next element for iteration.
|
protected OutputType |
loadEntity(InputType entity)
Hotspot that is invoked when returning an entity.
|
close, hasNext, isClosed, iterator, next, removeclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEach, spliteratorforEachRemainingprotected BerkeleyDBWiktionaryEdition edition
protected com.sleepycat.persist.EntityCursor<InputType extends OutputType> cursor
public BerkeleyDBWiktionaryIterator(BerkeleyDBWiktionaryEdition edition, com.sleepycat.persist.EntityCursor<InputType> cursor)
protected OutputType fetchNext()
WiktionaryIteratornull is to be returned, which causes the
iterator to return false for the next WiktionaryIterator.hasNext().fetchNext in class WiktionaryIterator<OutputType>protected OutputType loadEntity(InputType entity)
protected void doClose()
WiktionaryIteratordoClose in class WiktionaryIterator<OutputType>Copyright © 2011-2016 Ubiquitous Knowledge Processing (UKP) Lab. All Rights Reserved.