Package 

Interface CacheKey

    • Method Summary

      Modifier and Type Method Description
      abstract String toString() This is useful for instrumentation and debugging purposes.
      abstract boolean equals(Object o) This method must be implemented, otherwise the cache keys will be be compared by reference.
      abstract int hashCode() This method must be implemented with accordance to the equals method.
      abstract boolean containsUri(Uri uri) Returns true if this key was constructed from this Uri.
      abstract String getUriString() Returns a string representation of the URI at the heart of the cache key.
      abstract boolean isResourceIdForDebugging() Returns true if this key was constructed from a resource ID.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • toString

         abstract String toString()

        This is useful for instrumentation and debugging purposes.

      • equals

         abstract boolean equals(Object o)

        This method must be implemented, otherwise the cache keys will be be compared by reference.

      • hashCode

         abstract int hashCode()

        This method must be implemented with accordance to the equals method.

      • containsUri

         abstract boolean containsUri(Uri uri)

        Returns true if this key was constructed from this Uri.

        Used for cases like deleting all keys for a given uri.

      • getUriString

         abstract String getUriString()

        Returns a string representation of the URI at the heart of the cache key. In cases of multiplekeys being contained, the first is returned.

      • isResourceIdForDebugging

         abstract boolean isResourceIdForDebugging()

        Returns true if this key was constructed from a resource ID. If this ever changes, the diskcache entries corresponding to this cache key would be invalidated.