public abstract class AbstractFeatureSetProvider extends AbstractDisposable implements FeatureSetProvider
FeatureSetProvider
s, adding some utility
methods.Constructor and Description |
---|
AbstractFeatureSetProvider(AbstractFeatureStoreProvider store,
FeatureQuery query,
FeatureType featureType)
Creates a new
FeatureSetProvider . |
Modifier and Type | Method and Description |
---|---|
protected abstract AbstractFeatureProviderIterator |
createFastIterator(long index)
Creates a new fast
Iterator , begginning at the specified data
index. |
protected AbstractFeatureProviderIterator |
createFastIterator(long index,
long elements) |
protected abstract AbstractFeatureProviderIterator |
createIterator(long index)
Creates a new
Iterator , begginning at the specified data index. |
protected AbstractFeatureProviderIterator |
createIterator(long index,
long elements) |
DisposableIterator |
fastIterator()
Returns an iterator over the elements in this set, in the order
(if any) defined when the collection was obtained.
|
DisposableIterator |
fastIterator(long index) |
DisposableIterator |
fastIterator(long index,
long elements)
Returns an iterator over the elements in this set, in the order
(if any) defined when the collection was obtained.
|
protected FeatureType |
getFeatureType()
Returns the type of features to load.
|
protected FeatureQuery |
getQuery()
Returns the
FeatureQuery used to create this set. |
protected AbstractFeatureStoreProvider |
getStore()
Return the
AbstractFeatureStoreProvider . |
DisposableIterator |
iterator()
Returns an iterator over the elements in this set, in the order
(if any) defined when the collection was obtained.
|
DisposableIterator |
iterator(long index) |
DisposableIterator |
iterator(long index,
long elements)
Returns an iterator over the elements in this set, in the order
(if any) defined when the collection was obtained.
|
dispose, dispose, doDispose
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
canFilter, canIterateFromIndex, canOrder, getSize, isEmpty
dispose
public AbstractFeatureSetProvider(AbstractFeatureStoreProvider store, FeatureQuery query, FeatureType featureType)
FeatureSetProvider
.store
- the underlying FeatureStoreProvider
to get the data
fromquery
- used to create the FeatureSetProvider
featureType
- the type of feature to getprotected AbstractFeatureStoreProvider getStore()
AbstractFeatureStoreProvider
.protected FeatureQuery getQuery()
FeatureQuery
used to create this set.protected FeatureType getFeatureType()
public final DisposableIterator fastIterator() throws DataException
FeatureSetProvider
fastIterator
in interface FeatureSetProvider
DataException
- if there is an error getting the iteratorFeatureSetProvider.fastIterator()
,
#fastIterator(long)
public final DisposableIterator fastIterator(long index) throws DataException
DataException
public final DisposableIterator fastIterator(long index, long elements) throws DataException
FeatureSetProvider
fastIterator
in interface FeatureSetProvider
index
- index of first element to be returned from the iterator (by a
call to the next method).DataException
- if there is an error getting the iteratorFeatureSetProvider.fastIterator()
,
#fastIterator(long)
public final DisposableIterator iterator() throws DataException
FeatureSetProvider
Fast in this case means that each of the elements returned may be a reused or pooled object instance, so don't use it to be stored in any way.
If you need to store one of the FeatureProvider
of the iterator,
use the FeatureProvider.getCopy()
to create a clone of the
object.
iterator
in interface FeatureSetProvider
DataException
- if there is an error getting the iteratorpublic final DisposableIterator iterator(long index) throws DataException
DataException
public final DisposableIterator iterator(long index, long elements) throws DataException
FeatureSetProvider
Fast in this case means that each of the elements returned may be a reused or pooled object instance, so don't use it to be stored in any way.
If you need to store one of the FeatureProvider
of the iterator,
use the FeatureProvider.getCopy()
to create a clone of the
object.
iterator
in interface FeatureSetProvider
index
- index of first element to be returned from the iterator (by a
call to the next method).DataException
- if there is an error getting the iteratorprotected abstract AbstractFeatureProviderIterator createIterator(long index) throws DataException
Iterator
, begginning at the specified data index.index
- the first element position to be returned by the
Iterator
Iterator
DataException
- if there is an error creating the Iterator
protected AbstractFeatureProviderIterator createIterator(long index, long elements) throws DataException
DataException
protected abstract AbstractFeatureProviderIterator createFastIterator(long index) throws DataException
Iterator
, begginning at the specified data
index. By fast this means the object instances of data (
FeatureProvider
) may be reused between the
Iterator.next()
method invocations.index
- the first element position to be returned by the
Iterator
Iterator
DataException
- if there is an error creating the Iterator
protected AbstractFeatureProviderIterator createFastIterator(long index, long elements) throws DataException
DataException