public interface Request
Target
.Modifier and Type | Method and Description |
---|---|
void |
begin()
Starts an asynchronous load.
|
void |
clear()
Prevents any bitmaps being loaded from previous requests, releases any resources held by this
request, displays the current placeholder if one was provided, and marks the request as having
been cancelled.
|
boolean |
isCleared()
Returns true if the request has been cleared.
|
boolean |
isComplete()
Returns true if the request has completed successfully.
|
boolean |
isEquivalentTo(Request other)
|
boolean |
isFailed()
Returns true if the request has failed.
|
boolean |
isResourceSet()
Returns true if a non-placeholder resource is put.
|
boolean |
isRunning()
Returns true if this request is running and has not completed or failed.
|
void |
recycle()
Recycles the request object and releases its resources.
|
void begin()
void clear()
boolean isRunning()
boolean isComplete()
boolean isResourceSet()
isComplete()
} returns false.boolean isCleared()
boolean isFailed()
void recycle()
boolean isEquivalentTo(Request other)
true
if this Request
is equivalent to the given Request
(has
all of the same options and sizes).
This method is identical to Object.equals(Object)
except that it's specific to
Request
subclasses. We do not use Object.equals(Object)
directly because we
track Request
s in collections like Set
and it's perfectly legitimate
to have two different Request
objects for two different
Target
s (for example). Using a similar but different
method let's us selectively compare Request
objects to each other when it's useful in
specific scenarios.