Interface Request

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method 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 isAnyResourceSet()
      Returns true if a resource is set, even if the request is not yet complete or the primary request has failed.
      boolean isCleared()
      Returns true if the request has been cleared.
      boolean isComplete()
      Returns true if the request has completed successfully.
      boolean isEquivalentTo​(Request other)
      Returns true if this Request is equivalent to the given Request (has all of the same options and sizes).
      boolean isRunning()
      Returns true if this request is running and has not completed or failed.
      void pause()
      Similar to clear() for in progress requests (or portions of a request), but does nothing if the request is already complete.
    • Method Detail

      • begin

        void begin()
        Starts an asynchronous load.
      • clear

        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.
      • pause

        void pause()
        Similar to clear() for in progress requests (or portions of a request), but does nothing if the request is already complete.

        Unlike clear(), this method allows implementations to act differently on subparts of a request. For example if a Request has both a thumbnail and a primary request and the thumbnail portion of the request is complete, this method allows only the primary portion of the request to be paused without clearing the previously completed thumbnail portion.

      • isRunning

        boolean isRunning()
        Returns true if this request is running and has not completed or failed.
      • isComplete

        boolean isComplete()
        Returns true if the request has completed successfully.
      • isCleared

        boolean isCleared()
        Returns true if the request has been cleared.
      • isAnyResourceSet

        boolean isAnyResourceSet()
        Returns true if a resource is set, even if the request is not yet complete or the primary request has failed.
      • isEquivalentTo

        boolean isEquivalentTo​(Request other)
        Returns 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 Requests in collections like Set and it's perfectly legitimate to have two different Request objects for two different Targets (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.