public class DynObjectSetRasterInfo extends BaseWeakReferencingObservable implements DynObjectSet, Observer
DynObjectSet.NotificationEMPTY_DYNOBJECTSET| Constructor and Description |
|---|
DynObjectSetRasterInfo()
Creates a new facade over a given info, with fast dynobject
iteration.
|
| 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 |
addField(java.lang.String name,
java.lang.Object object,
int order)
Adds a field to the DynObject
|
void |
delete(DynObject dynObject)
Deletes a DynObject from this set.
|
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.
|
void |
update(Observable observable,
java.lang.Object notification)
Called whenever a
Observable object is changed and this
Observer has registered on it to receive notifications. |
addObserver, addObserver, addObservers, beginComplexNotification, clearChanged, clone, countObservers, deleteObserver, deleteObserver, deleteObservers, disableNotifications, enableNotifications, endComplexNotification, hasChanged, inComplex, isEnabledNotifications, notify, notifyObservers, notifyObservers, setChangedequals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddObserver, deleteObserver, deleteObserverspublic DynObjectSetRasterInfo()
public void addField(java.lang.String name,
java.lang.Object object,
int order)
name - object - order - 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 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 DynObjectpublic void update(Observable observable, java.lang.Object notification)
ObserverObservable object is changed and this
Observer has registered on it to receive notifications.
Implementations of this method will be called for each simple notification or, if a complex notification is created, for each of the child notifications.
In the latter case, don't assume any ordering in the notification between
this Observer and other Observers listening to the same
Observable.
In a complex notification scenario, if you want to receive only the
complex notification and not each of the child notifications, just
implement the ComplexObserver and prepare this method
implementation to handle receiving DefaultComplexNotification instances
as well as direct notification objects.