Package gov.nasa.worldwind.util
Class TextureAtlasElement.RequestTask
- java.lang.Object
-
- gov.nasa.worldwind.util.TextureAtlasElement.RequestTask
-
- All Implemented Interfaces:
java.lang.Runnable
- Enclosing class:
- TextureAtlasElement
protected static class TextureAtlasElement.RequestTask extends java.lang.Object implements java.lang.RunnableRequestTask is an implementation of the Runnable interface who'srunmethod retrieves and loads this element's image source.
-
-
Field Summary
Fields Modifier and Type Field Description protected TextureAtlasElementelemThe texture atlas element associated with this request task.
-
Constructor Summary
Constructors Modifier Constructor Description protectedRequestTask(TextureAtlasElement elem)Constructs a new request task with the specified texture atlas element, but otherwise does nothing.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object o)Indicates whether another request task is equivalent to this one.inthashCode()Returns the hash code for this request task's texture atlas element.voidrun()Retrieves and loads the image source from this request task's texture atlas element, and notifies the element when the load completes.java.lang.StringtoString()Returns the string representation of this request task's texture atlas element.
-
-
-
Field Detail
-
elem
protected TextureAtlasElement elem
The texture atlas element associated with this request task. Specified during construction.
-
-
Constructor Detail
-
RequestTask
protected RequestTask(TextureAtlasElement elem)
Constructs a new request task with the specified texture atlas element, but otherwise does nothing. Calling the new request tasksrunmethod 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:
java.lang.IllegalArgumentException- if the element isnull.
-
-
Method Detail
-
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:
runin interfacejava.lang.Runnable
-
equals
public boolean equals(java.lang.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:
equalsin classjava.lang.Object- Parameters:
o- the object to test.- Returns:
trueif 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:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
Returns the string representation of this request task's texture atlas element.- Overrides:
toStringin classjava.lang.Object
-
-