public abstract class AbstractFeatureSet extends AbstractIndexedVisitable implements FeatureSet
| Modifier and Type | Field and Description |
|---|---|
protected static Logger |
LOG |
| Constructor and Description |
|---|
AbstractFeatureSet() |
| Modifier and Type | Method and Description |
|---|---|
void |
accept(Visitor visitor,
long firstValueIndex,
long elements) |
protected void |
doAccept(Visitor visitor,
long firstValueIndex)
Provides each value of this container to the provided
Visitor. |
protected void |
doAccept(Visitor visitor,
long firstValueIndex,
long elements) |
DisposableIterator |
fastIterator()
Returns a fast iterator over this set.
|
Feature |
first()
Return the first feature of the set.
|
DynObjectSet |
getDynObjectSet()
Returns a
DynObjectSet of the contents of this set. |
DynObjectSet |
getDynObjectSet(boolean fast)
Returns a
DynObjectSet of the contents of this set. |
abstract FeatureStore |
getFeatureStore() |
boolean |
isEmpty()
Indicates whether this FeatureSet contains zero features.
|
boolean |
isFromStore(DataStore store)
Indicates whether this DataSet belongs to a specific store
|
DisposableIterator |
iterator()
Returns an iterator over the elements in this collection, in the order
(if any) defined when the collection was obtained.
|
accept, doAcceptacceptclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaccept, delete, fastIterator, fastIterator, getDefaultFeatureType, getFeatureTypes, getSize, insert, iterator, iterator, updatedisposepublic abstract FeatureStore getFeatureStore()
public final void accept(Visitor visitor, long firstValueIndex, long elements) throws BaseException
accept in interface FeatureSetBaseExceptionprotected void doAccept(Visitor visitor, long firstValueIndex) throws VisitCanceledException, BaseException
AbstractIndexedVisitableVisitor.
The VisitCanceledException will be managed by the parent
AbstractIndexedVisitable class, so simply throw it.doAccept in class AbstractIndexedVisitableVisitCanceledExceptionBaseExceptionprotected void doAccept(Visitor visitor, long firstValueIndex, long elements) throws VisitCanceledException, BaseException
VisitCanceledExceptionBaseExceptionpublic Feature first()
FeatureSetfirst in interface FeatureSetpublic boolean isEmpty()
throws DataException
FeatureSetisEmpty in interface FeatureSetDataExceptionpublic DisposableIterator fastIterator() throws DataException
FeatureSetFast 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 Feature of the iterator, use the
Feature.getCopy() to create a clone of the object.
NOTE: if you use this method to get the iterator, you
must get sure the iterator is disposed (@see
Disposable.dispose()) in any case, even if an error occurs
while getting the data. It is recommended to use the accept
methods instead, which handle everything for you.
Take into account the accept methods may use a fast iterator to
get the features.
fastIterator in interface FeatureSetDataExceptionDataSet.accept(org.gvsig.tools.visitor.Visitor),
FeatureSet.accept(org.gvsig.tools.visitor.Visitor, long)public DisposableIterator iterator()
FeatureSetiterator in interface FeatureSetDataSet.accept(org.gvsig.tools.visitor.Visitor),
FeatureSet.accept(org.gvsig.tools.visitor.Visitor, long),
FeatureSet.fastIterator(),
FeatureSet.fastIterator(long)public DynObjectSet getDynObjectSet()
FeatureSetDynObjectSet of the contents of this set.
Defaults to fast iteration.getDynObjectSet in interface FeatureSetDynObjectSetpublic DynObjectSet getDynObjectSet(boolean fast)
FeatureSetDynObjectSet of the contents of this set.getDynObjectSet in interface FeatureSetfast - if the set will be able to be iterated in a fast way, by
reusing the DynObject instance for each
Feature instance.DynObjectSetpublic boolean isFromStore(DataStore store)
DataSetisFromStore in interface DataSetstore - a DataStore