public class KeyValues extends java.lang.Object implements java.io.Closeable, java.util.Iterator<KeyValue>
This is a set of Value instances, that is there is no duplicated elements.
Use a ValuesIterator to traverse all the elements into the set.
When the Values instance is closed, it closes all existing and non-closed ValuesIterator instances too.
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes the KeyValues instance.
|
boolean |
hasNext()
Checks if the KeyValues has more KeyValue pairs.
|
boolean |
isClosed()
Gets if KeyValues instance has been closed or not.
|
KeyValue |
next()
Gets the next KeyValue pair.
|
void |
next(KeyValue kv)
Gets the next KeyValue pair.
|
public boolean isClosed()
close()
public KeyValue next()
next
in interface java.util.Iterator<KeyValue>
public void next(KeyValue kv)
kv
- Returns the next KeyValue pairpublic boolean hasNext()
hasNext
in interface java.util.Iterator<KeyValue>
public void close()
It must be called to ensure the integrity of all data.
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable