de.tudarmstadt.ukp.jwktl.api.util
Class HierarchicalWiktionaryIterator<IterableType,OuterType>
java.lang.Object
de.tudarmstadt.ukp.jwktl.api.util.WiktionaryIterator<IterableType>
de.tudarmstadt.ukp.jwktl.api.util.HierarchicalWiktionaryIterator<IterableType,OuterType>
- Type Parameters:
IterableType
- The type the inner iterator.OuterType
- The type the outer iterator.
- All Implemented Interfaces:
- IWiktionaryIterator<IterableType>, Iterable<IterableType>, Iterator<IterableType>
public abstract class HierarchicalWiktionaryIterator<IterableType,OuterType>
- extends WiktionaryIterator<IterableType>
Generic implementation for an iterator of iterators. That is, an object,
which is initialized with an iterator of type OuterType. This iterator is
being iterated an converted into an iterator of type IterableType. For each
element of the outer iterator, all elements of the inner iterator are then
traversed. For example, a hierarchical iterator of outer type
WiktionaryEntry and inner type WiktionarySense enumerates all senses of
entry1, then all senses of entry2, etc.
- Author:
- Christian M. Meyer
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
outerIterator
protected Iterator<OuterType> outerIterator
innerIterator
protected IWiktionaryIterator<IterableType> innerIterator
HierarchicalWiktionaryIterator
public HierarchicalWiktionaryIterator(Iterator<OuterType> outerIterator)
- Initialize the iterator for the given outer type.
fetchNext
protected IterableType fetchNext()
- Description copied from class:
WiktionaryIterator
- Hotspot for fetching the next element for iteration. If there are no
elements left,
null
is to be returned, which causes the
iterator to return false
for the next WiktionaryIterator.hasNext()
.
- Specified by:
fetchNext
in class WiktionaryIterator<IterableType>
getInnerIterator
protected abstract IWiktionaryIterator<IterableType> getInnerIterator(OuterType outer)
doClose
protected void doClose()
- Description copied from class:
WiktionaryIterator
- Hotspot that is invoked after closing the iteration, i.e. either all
items are traversed or manual termination. The hotspot is called only
once.
- Specified by:
doClose
in class WiktionaryIterator<IterableType>
Copyright © 2011-2013 Ubiquitous Knowledge Processing (UKP) Lab. All Rights Reserved.