public class MultiDynObjectSet extends java.lang.Object implements DynObjectSet
DynObjectSets as if they were an only contiguous
set of DynObjects.| Modifier and Type | Class and Description |
|---|---|
static class |
MultiDynObjectSet.MultiDynObjectSetDisposableIterator |
DynObjectSet.NotificationEMPTY_DYNOBJECTSET| Constructor and Description |
|---|
MultiDynObjectSet(DynObjectSet[] innerSets)
Creates a new
MultiDynObjectSet with the list of
DynObjectSets to façade. |
| Modifier and Type | Method and Description |
|---|---|
void |
accept(Visitor visitor)
Provides each value of this container to the provided
Visitor. |
void |
accept(Visitor visitor,
long firstValueIndex)
Provides each value of this container to the provided
Visitor,
beginning from the provided index position. |
void |
addObserver(Observer o) |
void |
delete(DynObject dynObject)
Deletes a DynObject from this set.
|
void |
deleteObserver(Observer o) |
void |
deleteObservers() |
void |
dispose()
Disposes the current object, to allow it to close and dispose any used
resources.
|
long |
getSize()
Returns the number of
DynObject(s) contained in this
DynObjectSet. |
boolean |
isDeleteEnabled()
Tells if DynObject deletion is enabled into this set.
|
boolean |
isEmpty()
Indicates whether this DynObjectSet contains zero DynObjects.
|
boolean |
isUpdateEnabled()
Tells if DynObject updates are enabled into this set.
|
DisposableIterator |
iterator()
Returns an iterator over the elements in this collection, in the order
(if any) defined when the collection was obtained.
|
DisposableIterator |
iterator(long index)
Returns an iterator over the elements in this collection, in the order
(if any) defined when the collection was obtained.
|
void |
update(DynObject dynObject)
Updates a DynObject from this set.
|
public MultiDynObjectSet(DynObjectSet[] innerSets)
MultiDynObjectSet with the list of
DynObjectSets to façade.public void dispose()
DisposableNOTE:After calling this method, the object may not be usable anymore.
dispose in interface Disposablepublic void accept(Visitor visitor, long firstValueIndex) throws BaseException
IndexedVisitableVisitor,
beginning from the provided index position.accept in interface IndexedVisitablevisitor - the visitor to apply to each value.firstValueIndex - index of first element to be visited by the VisitorBaseException - if there is an error while performing the visitpublic void accept(Visitor visitor) throws BaseException
VisitableVisitor.accept in interface Visitablevisitor - the visitor to apply to each value.BaseException - if there is an error while performing the visitpublic long getSize()
throws BaseException
DynObjectSetDynObject(s) contained in this
DynObjectSet.getSize in interface DynObjectSetDynObject(s) contained in this DynObjectSet.BaseExceptionpublic DisposableIterator iterator(long index) throws BaseException
DynObjectSetnext method. An initial call to the
previous method would return the element with the specified
index minus one.
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 DynObjects.
iterator in interface DynObjectSetindex - index of first element to be returned from the iterator (by a
call to the next method).BaseException - if the index is out of range (index < 0 || index >
size()).Visitable.accept(org.gvsig.tools.visitor.Visitor),
IndexedVisitable.accept(org.gvsig.tools.visitor.Visitor, long)public DisposableIterator iterator() throws BaseException
DynObjectSet
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 DynObjects.
iterator in interface DynObjectSetBaseExceptionVisitable.accept(org.gvsig.tools.visitor.Visitor),
IndexedVisitable.accept(org.gvsig.tools.visitor.Visitor, long)public boolean isEmpty()
throws BaseException
DynObjectSetisEmpty in interface DynObjectSetBaseExceptionpublic void addObserver(Observer o)
addObserver in interface Observablepublic void deleteObserver(Observer o)
deleteObserver in interface Observablepublic void deleteObservers()
deleteObservers in interface Observablepublic boolean isDeleteEnabled()
DynObjectSetisDeleteEnabled in interface DynObjectSetpublic void delete(DynObject dynObject) throws BaseException
DynObjectSetdelete in interface DynObjectSetdynObject - to removeBaseException - if there is an error removing the DynObjectpublic boolean isUpdateEnabled()
DynObjectSetisUpdateEnabled in interface DynObjectSetpublic void update(DynObject dynObject) throws BaseException
DynObjectSetupdate in interface DynObjectSetdynObject - to updateBaseException - if there is an error updating the DynObject