public final class ImageCollection extends Object implements Collection<GlobeImageOverlay>, Iterable<GlobeImageOverlay>, IDisposable
GlobeImageOverlay objects.| Modifier and Type | Method and Description |
|---|---|
boolean |
add(GlobeImageOverlay imageryOverlay)
Adds
imageryOverlay to the collection. |
GlobeImageOverlay |
add(String uri)
|
GlobeImageOverlay |
add(URI uri)
Creates a
GlobeOverlay from the uri and adds it to the collection. |
void |
addAddComplete(EventHandler<GlobeImageOverlayAddCompleteEventArgs> value)
Adds a handler for an event that is raised when an asynchronous add is completed.
|
boolean |
addAll(Collection<? extends GlobeImageOverlay> c)
Adds all of the elements in the specified collection to this collection
(optional operation).
|
void |
addAsync(GlobeImageOverlay imageryOverlay)
Adds
imageryOverlay to the collection asynchronously. |
GlobeImageOverlay |
addAsync(String uri)
Creates a
GlobeImageOverlay from the uri, which represents a URI, and adds it to the collection asynchronously. |
GlobeImageOverlay |
addAsync(URI uri)
Creates a
GlobeImageOverlay from the uri and adds it to the collection asynchronously. |
void |
addRange(Iterable<GlobeImageOverlay> overlays)
Adds the elements of the specified collection to the end of the
ImageCollection. |
void |
addRangeAsync(Iterable<GlobeImageOverlay> overlays)
Adds the elements of the specified collection to the end of the
ImageCollection asynchronously. |
void |
bringToFront(GlobeImageOverlay imageryOverlay)
Brings the
GlobeImageOverlay to the front of the collection so it is rendered first or on the bottom. |
void |
clear()
Removes all
GlobeImageOverlay objects from the collection. |
boolean |
contains(Object imageryOverlay)
Checks the presence of a
GlobeImageOverlay in the collection. |
boolean |
contains(String stringUri)
Checks the presence of a
GlobeImageOverlay with the specified Uri in the collection. |
boolean |
contains(URI uri)
Checks the presence of a
GlobeImageOverlay with the specified URI in the collection. |
boolean |
containsAll(Collection<?> c)
Returns true if this collection contains all of the elements
in the specified collection.
|
void |
copyTo(GlobeImageOverlay[] toArray,
int startingIndex) |
void |
dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting
unmanaged resources.
|
protected void |
dispose(boolean disposing) |
protected void |
finalize()
Called by the garbage collector on an object when garbage collection
determines that there are no more references to the object.
|
GlobeImageOverlay |
get(int index)
Gets the
GlobeImageOverlay at the specified index. |
boolean |
getIsReadOnly()
Gets whether or not the collection is read only.
|
int |
indexOf(GlobeImageOverlay imageryOverlay)
Gets the index of the specified
GlobeImageOverlay. |
int |
indexOf(String stringUri)
Gets the index of the
GlobeImageOverlay with the specified Uri. |
int |
indexOf(URI uri)
Gets the index of the
GlobeImageOverlay with the specified URI. |
boolean |
isEmpty()
Returns true if this collection contains no elements.
|
Iterator<GlobeImageOverlay> |
iterator()
Constructs an iterator that can be used to iterate the collection.
|
void |
move(GlobeImageOverlay imageryOverlay,
int newPosition)
Moves the
GlobeImageOverlay to the specified position. |
void |
move(int index,
int newPosition)
Moves the
GlobeImageOverlay at the specified index to the specified position. |
boolean |
remove(Object globeOverlay)
Removes a
GlobeImageOverlay from the collection. |
void |
removeAddComplete(EventHandler<GlobeImageOverlayAddCompleteEventArgs> value)
Removes a handler for an event that is raised when an asynchronous add is completed.
|
boolean |
removeAll(Collection<?> c)
Removes all of this collection's elements that are also contained in the
specified collection (optional operation).
|
boolean |
retainAll(Collection<?> c)
Retains only the elements in this collection that are contained in the
specified collection (optional operation).
|
void |
sendToBack(GlobeImageOverlay imageryOverlay)
Sends the
GlobeImageOverlay to the back of the collection so it is rendered last or on the top. |
int |
size()
Gets the number of
GlobeOverlay objects in the collection. |
void |
swap(GlobeImageOverlay imageryOverlay1,
GlobeImageOverlay imageryOverlay2)
Swaps the position of two
GlobeImageOverlay objects. |
void |
swap(int index1,
int index2)
Swaps the position of two
GlobeImageOverlay objects at the specified indices. |
Object[] |
toArray()
Returns an array containing all of the elements in this collection.
|
<T> T[] |
toArray(T[] a)
Returns an array containing all of the elements in this collection;
the runtime type of the returned array is that of the specified array.
|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitequals, hashCode, parallelStream, removeIf, spliterator, streamcloseprotected void finalize()
throws Throwable
java.lang.Objectfinalize method to dispose of
system resources or to perform other cleanup.
The general contract of finalize is that it is invoked
if and when the Java™ virtual
machine has determined that there is no longer any
means by which this object can be accessed by any thread that has
not yet died, except as a result of an action taken by the
finalization of some other object or class which is ready to be
finalized. The finalize method may take any action, including
making this object available again to other threads; the usual purpose
of finalize, however, is to perform cleanup actions before
the object is irrevocably discarded. For example, the finalize method
for an object that represents an input/output connection might perform
explicit I/O transactions to break the connection before the object is
permanently discarded.
The finalize method of class Object performs no
special action; it simply returns normally. Subclasses of
Object may override this definition.
The Java programming language does not guarantee which thread will
invoke the finalize method for any given object. It is
guaranteed, however, that the thread that invokes finalize will not
be holding any user-visible synchronization locks when finalize is
invoked. If an uncaught exception is thrown by the finalize method,
the exception is ignored and finalization of that object terminates.
After the finalize method has been invoked for an object, no
further action is taken until the Java virtual machine has again
determined that there is no longer any means by which this object can
be accessed by any thread that has not yet died, including possible
actions by other objects or classes which are ready to be finalized,
at which point the object may be discarded.
The finalize method is never invoked more than once by a Java
virtual machine for any given object.
Any exception thrown by the finalize method causes
the finalization of this object to be halted, but is otherwise
ignored.
finalize in class ObjectThrowable - the Exception raised by this methodWeakReference,
PhantomReferencepublic final void dispose()
IDisposabledispose in interface IDisposableprotected void dispose(boolean disposing)
public boolean getIsReadOnly()
public void addAddComplete(EventHandler<GlobeImageOverlayAddCompleteEventArgs> value)
value - The event handler.public void removeAddComplete(EventHandler<GlobeImageOverlayAddCompleteEventArgs> value)
value - The event handler.public GlobeImageOverlay get(int index)
GlobeImageOverlay at the specified index.public Iterator<GlobeImageOverlay> iterator()
iterator in interface Iterable<GlobeImageOverlay>iterator in interface Collection<GlobeImageOverlay>public boolean contains(Object imageryOverlay)
GlobeImageOverlay in the collection.contains in interface Collection<GlobeImageOverlay>imageryOverlay - The GlobeImageOverlay to search for in the collection.imageryOverlay is in the collection.public final boolean contains(URI uri)
GlobeImageOverlay with the specified URI in the collection.uri - The URI to search for in the collection.GlobeImageOverlay with the specified URI is in the collection.public final boolean contains(String stringUri)
GlobeImageOverlay with the specified Uri in the collection.stringUri - The String that contains the Uri to search for in the collection.GlobeImageOverlay with the specified Uri is in the collection.public boolean remove(Object globeOverlay)
GlobeImageOverlay from the collection.remove in interface Collection<GlobeImageOverlay>globeOverlay - The GlobeImageOverlay to be removed.globeOverlay was found and successfully removed from the collection.public void clear()
GlobeImageOverlay objects from the collection.clear in interface Collection<GlobeImageOverlay>public boolean add(GlobeImageOverlay imageryOverlay)
imageryOverlay to the collection.add in interface Collection<GlobeImageOverlay>imageryOverlay - The GlobeImageOverlay to be added to the collection.public final void addAsync(GlobeImageOverlay imageryOverlay)
imageryOverlay to the collection asynchronously.imageryOverlay - The GlobeImageOverlay to be added to the collection.public final void addRange(Iterable<GlobeImageOverlay> overlays)
ImageCollection.overlays - A group of GlobeImageOverlay objects to be added to the collection.public final void addRangeAsync(Iterable<GlobeImageOverlay> overlays)
ImageCollection asynchronously.overlays - A group of GlobeImageOverlay objects to be added to the collection.public final int indexOf(GlobeImageOverlay imageryOverlay)
GlobeImageOverlay.imageryOverlay - The GlobeImageOverlay to search for in the collection.imageryOverlay in the collection. -1 if it isn't found.public final int indexOf(URI uri)
GlobeImageOverlay with the specified URI.uri - The URI to search for in the collection.GlobeImageOverlay with the specified URI in the collection. -1 if it isn't found.public final int indexOf(String stringUri)
GlobeImageOverlay with the specified Uri.stringUri - The String containing the Uri to search for in the collection.GlobeImageOverlay with the specified Uri in the collection. -1 if it isn't found.public final GlobeImageOverlay add(URI uri)
GlobeOverlay from the uri and adds it to the collection.uri - The URI of the GlobeOverlay. The GlobeOverlay must be of a recognized format.GlobeOverlay that was created and added to the collectionpublic final GlobeImageOverlay addAsync(URI uri)
GlobeImageOverlay from the uri and adds it to the collection asynchronously.uri - The URI of the GlobeImageOverlay. The GlobeImageOverlay must be of a recognized format.GlobeImageOverlay that was created and added to the collectionpublic final GlobeImageOverlay add(String uri)
uri - The String that represents the URI of the GlobeOverlay. The GlobeOverlay must be of a recognized format.GlobeOverlay that was created and added to the collectionpublic final GlobeImageOverlay addAsync(String uri)
GlobeImageOverlay from the uri, which represents a URI, and adds it to the collection asynchronously.uri - The String that represents the URI of the GlobeImageOverlay. The GlobeImageOverlay must be of a recognized format.GlobeImageOverlay that was created and added to the collectionpublic final void swap(GlobeImageOverlay imageryOverlay1, GlobeImageOverlay imageryOverlay2)
GlobeImageOverlay objects.imageryOverlay1 - The first GlobeImageOverlay object.imageryOverlay2 - The second GlobeImageOverlay object.public final void swap(int index1,
int index2)
GlobeImageOverlay objects at the specified indices.index1 - The index of the first GlobeImageOverlay.index2 - The index of the second GlobeImageOverlay.public final void move(GlobeImageOverlay imageryOverlay, int newPosition)
GlobeImageOverlay to the specified position.imageryOverlay - The GlobeImageOverlay to move.newPosition - The new position of the imageryOverlay.public final void move(int index,
int newPosition)
GlobeImageOverlay at the specified index to the specified position.index - The index of the GlobeImageOverlay to move.newPosition - The new position of the GlobeImageOverlay.public final void bringToFront(GlobeImageOverlay imageryOverlay)
GlobeImageOverlay to the front of the collection so it is rendered first or on the bottom.imageryOverlay - The GlobeImageOverlay to bring to the front of the collection.public final void sendToBack(GlobeImageOverlay imageryOverlay)
GlobeImageOverlay to the back of the collection so it is rendered last or on the top.imageryOverlay - The GlobeImageOverlay to send to the back of the collection.public int size()
GlobeOverlay objects in the collection.size in interface Collection<GlobeImageOverlay>public boolean isEmpty()
java.util.CollectionisEmpty in interface Collection<GlobeImageOverlay>public Object[] toArray()
java.util.CollectionThe returned array will be "safe" in that no references to it are maintained by this collection. (In other words, this method must allocate a new array even if this collection is backed by an array). The caller is thus free to modify the returned array.
This method acts as bridge between array-based and collection-based APIs.
toArray in interface Collection<GlobeImageOverlay>public <T> T[] toArray(T[] a)
java.util.CollectionIf this collection fits in the specified array with room to spare (i.e., the array has more elements than this collection), the element in the array immediately following the end of the collection is set to null. (This is useful in determining the length of this collection only if the caller knows that this collection does not contain any null elements.)
If this collection makes any guarantees as to what order its elements are returned by its iterator, this method must return the elements in the same order.
Like the Collection.toArray() method, this method acts as bridge between
array-based and collection-based APIs. Further, this method allows
precise control over the runtime type of the output array, and may,
under certain circumstances, be used to save allocation costs.
Suppose x is a collection known to contain only strings. The following code can be used to dump the collection into a newly allocated array of String:
String[] y = x.toArray(new String[0]);
Note that toArray(new Object[0]) is identical in function to
toArray().toArray in interface Collection<GlobeImageOverlay>T - the runtime type of the array to contain the collectiona - the array into which the elements of this collection are to be
stored, if it is big enough; otherwise, a new array of the same
runtime type is allocated for this purpose.public boolean addAll(Collection<? extends GlobeImageOverlay> c)
java.util.CollectionaddAll in interface Collection<GlobeImageOverlay>c - collection containing elements to be added to this collectionCollection.add(Object)public boolean removeAll(Collection<?> c)
java.util.CollectionremoveAll in interface Collection<GlobeImageOverlay>c - collection containing elements to be removed from this collectionCollection.remove(Object),
Collection.contains(Object)public boolean retainAll(Collection<?> c)
java.util.CollectionretainAll in interface Collection<GlobeImageOverlay>c - collection containing elements to be retained in this collectionCollection.remove(Object),
Collection.contains(Object)public boolean containsAll(Collection<?> c)
java.util.CollectioncontainsAll in interface Collection<GlobeImageOverlay>c - collection to be checked for containment in this collectionCollection.contains(Object)public void copyTo(GlobeImageOverlay[] toArray, int startingIndex)