T - the value typepublic class ModelInputSourceDriver<T> extends Object implements SourceDriver<T>
SourceDriver using ModelInputProvider.| Constructor and Description |
|---|
ModelInputSourceDriver(ModelInputProvider<T> provider,
T value)
Creates a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Disposes this object.
|
T |
get()
Gets the current data model object prepared by the
SourceDriver.next() method. |
boolean |
next()
Returns true iff the next data model object exists,
and then the
SourceDriver.get() method returns its object. |
void |
prepare()
Prepares this driver to invoke
SourceDriver.next() method. |
public ModelInputSourceDriver(ModelInputProvider<T> provider, T value)
provider - the source model inputsvalue - the value object used for bufferIllegalArgumentException - if any parameter is nullpublic void prepare()
SourceDriverSourceDriver.next() method.
This method will be invoked before SourceDriver.next() only once.
This operation can execute only on the same thread as created this object.prepare in interface SourceDriver<T>prepare in interface Preparablepublic boolean next()
throws IOException
SourceDriverSourceDriver.get() method returns its object.
This operation can execute only on the same thread as created this object.next in interface SourceDriver<T>true if the next data model object exists, otherwise falseIOException - if failed to prepare the next datapublic T get() throws IOException
SourceDriverSourceDriver.next() method.
This operation can execute only on the same thread as created this object.get in interface SourceDriver<T>IOException - if failed to prepare the next dataSourceDriver.next()public void close()
throws IOException
SourceDriverclose in interface SourceDriver<T>close in interface Closeableclose in interface AutoCloseableIOException - if failed to connectCopyright © 2011–2019 Asakusa Framework Team. All rights reserved.