NASA World Wind

gov.nasa.worldwind.util
Class TextureAtlasElement.RequestTask

java.lang.Object
  extended by gov.nasa.worldwind.util.TextureAtlasElement.RequestTask
All Implemented Interfaces:
Runnable
Enclosing class:
TextureAtlasElement

protected static class TextureAtlasElement.RequestTask
extends Object
implements Runnable

RequestTask is an implementation of the Runnable interface who's run method retrieves and loads this element's image source.


Field Summary
protected  TextureAtlasElement elem
          The texture atlas element associated with this request task.
 
Constructor Summary
protected TextureAtlasElement.RequestTask(TextureAtlasElement elem)
          Constructs a new request task with the specified texture atlas element, but otherwise does nothing.
 
Method Summary
 boolean equals(Object o)
          Indicates whether another request task is equivalent to this one.
 int hashCode()
          Returns the hash code for this request task's texture atlas element.
 void run()
          Retrieves and loads the image source from this request task's texture atlas element, and notifies the element when the load completes.
 String toString()
          Returns the string representation of this request task's texture atlas element.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

elem

protected TextureAtlasElement elem
The texture atlas element associated with this request task. Specified during construction.

Constructor Detail

TextureAtlasElement.RequestTask

protected TextureAtlasElement.RequestTask(TextureAtlasElement elem)
Constructs a new request task with the specified texture atlas element, but otherwise does nothing. Calling the new request tasks run method causes this to retrieve and load the specified element's image source.

Parameters:
elem - the texture atlas element who's image source is retrieved and loaded.
Throws:
IllegalArgumentException - if the element is null.
Method Detail

equals

public boolean equals(Object o)
Indicates whether another request task is equivalent to this one. This tests equality using the texture atlas element source of each task.

Overrides:
equals in class Object
Parameters:
o - the object to test.
Returns:
true if the specified object is a RequestTask, and its texture atlas element is equivalent to this task's texture atlas element.

hashCode

public int hashCode()
Returns the hash code for this request task's texture atlas element.

Overrides:
hashCode in class Object

run

public void run()
Retrieves and loads the image source from this request task's texture atlas element, and notifies the element when the load completes. This does nothing if the current thread has been interrupted.

Specified by:
run in interface Runnable

toString

public String toString()
Returns the string representation of this request task's texture atlas element.

Overrides:
toString in class Object

NASA World Wind