-
public interface CacheKey
-
-
Method Summary
Modifier and Type Method Description abstract StringtoString()This is useful for instrumentation and debugging purposes. abstract booleanequals(Object o)This method must be implemented, otherwise the cache keys will be be compared by reference. abstract inthashCode()This method must be implemented with accordance to the equals method. abstract booleancontainsUri(Uri uri)Returns true if this key was constructed from this Uri. abstract StringgetUriString()Returns a string representation of the URI at the heart of the cache key. abstract booleanisResourceIdForDebugging()Returns true if this key was constructed from a resource ID. -
-
Method Detail
-
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.
-
-
-
-