public final class DictionaryIterator extends java.lang.Object implements java.util.Iterator<WordData>
WordData entries of a Dictionary. The stems can be decoded from compressed format or
the compressed form can be preserved.| Modifier and Type | Field and Description |
|---|---|
private java.nio.charset.CharsetDecoder |
decoder |
private boolean |
decodeStems |
private java.util.Iterator<java.nio.ByteBuffer> |
entriesIter |
private WordData |
entry |
private java.nio.ByteBuffer |
inflectedBuffer |
private java.nio.CharBuffer |
inflectedCharBuffer |
private byte |
separator |
private ISequenceEncoder |
sequenceEncoder |
private java.nio.ByteBuffer |
temp |
| Constructor and Description |
|---|
DictionaryIterator(Dictionary dictionary,
java.nio.charset.CharsetDecoder decoder,
boolean decodeStems) |
| Modifier and Type | Method and Description |
|---|---|
private java.nio.CharBuffer |
bytesToChars(java.nio.ByteBuffer bytes,
java.nio.CharBuffer chars)
Decode the byte buffer, optionally expanding the char buffer.
|
boolean |
hasNext() |
WordData |
next() |
void |
remove() |
private final java.nio.charset.CharsetDecoder decoder
private final java.util.Iterator<java.nio.ByteBuffer> entriesIter
private final WordData entry
private final byte separator
private final boolean decodeStems
private java.nio.ByteBuffer inflectedBuffer
private java.nio.CharBuffer inflectedCharBuffer
private java.nio.ByteBuffer temp
private final ISequenceEncoder sequenceEncoder
public DictionaryIterator(Dictionary dictionary, java.nio.charset.CharsetDecoder decoder, boolean decodeStems)
public boolean hasNext()
hasNext in interface java.util.Iterator<WordData>private java.nio.CharBuffer bytesToChars(java.nio.ByteBuffer bytes,
java.nio.CharBuffer chars)
public void remove()
remove in interface java.util.Iterator<WordData>