Value
- public abstract class SingleValueCloseableIterator<Value> extends SingleValueIterator<Value> implements CloseableIterator<Value>
Closeable
and an Iterator
interface. After returning the Value
value via SingleValueIterator.next()
, SingleValueIterator.hasNext()
will return false
.
This class is especially useful if you do not wish to create a Collection
to hold a single value
in which to create an Iterator.EMPTY, value
Constructor and Description |
---|
SingleValueCloseableIterator(Value value) |
Modifier and Type | Method and Description |
---|---|
abstract void |
close() |
protected Value |
getCloseableInput() |
hasNext, next, remove, reset
public SingleValueCloseableIterator(Value value)
protected Value getCloseableInput()
public abstract void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
IOException
Copyright © 2007-2015 Concurrent, Inc. All Rights Reserved.