-
public interface ModelAn optional interface that models can implement to enhance control over ImageModule behaviors.
-
-
Method Summary
Modifier and Type Method Description abstract booleanisEquivalentTo(@Nullable() Object other)Returns {@code true}if this model produces the same image using the same mechanism (server,authentication, source etc) as the given model.-
-
Method Detail
-
isEquivalentTo
abstract boolean isEquivalentTo(@Nullable() Object other)
Returns
{@code true}if this model produces the same image using the same mechanism (server,authentication, source etc) as the given model.Models must also override equals and hashCode to ensure that caching functions correctly. If this object returns
{@code true}from thismethod for a given Model, it must also be equal to and have the same hash code as the givenmodel.However, this model may be equal to and have the same hash code as a given model but stillreturn
{@code false}from this method. This method optionally allows you to differentiatebetween Models that load the same image via multiple different means. For example one Modelmight load the image from server A and another model might load the same image from server B.The models must be equal to each other with the same hash code because they load the sameimage. However two requests made with the different models are not exactly the same because theway the image is loaded will differ.
-
-
-
-