@Override public boolean equals(Object obj) { if (obj instanceof GifUrlSet) { GifUrlSet other = (GifUrlSet) obj; return Util.bothNullOrEqual(original, other.original) && Util.bothNullOrEqual(fixed_width, other.fixed_width) && Util.bothNullOrEqual(fixed_height, other.fixed_height); } return false; }
@Override public boolean equals(Object obj) { if (obj instanceof GifResult) { GifResult other = (GifResult) obj; return Util.bothNullOrEqual(id, other.id) && Util.bothNullOrEqual(images, other.images); } return false; }
@Override public boolean equals(Object obj) { if (obj instanceof GifImage) { GifImage other = (GifImage) obj; return other.width == width && other.height == height && Util.bothNullOrEqual(url, other.url); } return false; }
@Override public boolean equals(Object o) { if (o instanceof Key) { Key other = (Key) o; return size == other.size && Util.bothNullOrEqual(config, other.config); } return false; }
@Override public boolean equals(Object o) { if (o instanceof BaseRequestOptions<?>) { BaseRequestOptions<?> other = (BaseRequestOptions<?>) o; return Float.compare(other.sizeMultiplier, sizeMultiplier) == 0 && errorId == other.errorId && Util.bothNullOrEqual(errorPlaceholder, other.errorPlaceholder) && placeholderId == other.placeholderId && Util.bothNullOrEqual(placeholderDrawable, other.placeholderDrawable) && fallbackId == other.fallbackId && Util.bothNullOrEqual(fallbackDrawable, other.fallbackDrawable) && isCacheable == other.isCacheable && overrideHeight == other.overrideHeight && overrideWidth == other.overrideWidth && isTransformationRequired == other.isTransformationRequired && isTransformationAllowed == other.isTransformationAllowed && useUnlimitedSourceGeneratorsPool == other.useUnlimitedSourceGeneratorsPool && onlyRetrieveFromCache == other.onlyRetrieveFromCache && diskCacheStrategy.equals(other.diskCacheStrategy) && priority == other.priority && options.equals(other.options) && transformations.equals(other.transformations) && resourceClass.equals(other.resourceClass) && Util.bothNullOrEqual(signature, other.signature) && Util.bothNullOrEqual(theme, other.theme); } return false; }
@SuppressWarnings({"PMD.SimplifyBooleanReturns", "RedundantIfStatement"}) @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } MultiClassKey that = (MultiClassKey) o; if (!first.equals(that.first)) { return false; } if (!second.equals(that.second)) { return false; } if (!Util.bothNullOrEqual(third, that.third)) { return false; } return true; }
@Override public boolean equals(Object o) { if (o instanceof ResourceCacheKey) { ResourceCacheKey other = (ResourceCacheKey) o; return height == other.height && width == other.width && Util.bothNullOrEqual(transformation, other.transformation) && decodedResourceClass.equals(other.decodedResourceClass) && sourceKey.equals(other.sourceKey) && signature.equals(other.signature) && options.equals(other.options); } return false; }
@Override public boolean equals(Object o) { if (o instanceof Key) { Key other = (Key) o; return size == other.size && Util.bothNullOrEqual(config, other.config); } return false; }
Drawable second = new GradientDrawable(); assertThat(first).isNotEqualTo(second); assertThat(Util.bothNullOrEqual(first, second)).isFalse(); new EqualsTester() .addEqualityGroup(
@Override public boolean equals(Object o) { if (o instanceof RequestOptions) { RequestOptions other = (RequestOptions) o; return Float.compare(other.sizeMultiplier, sizeMultiplier) == 0 && errorId == other.errorId && Util.bothNullOrEqual(errorPlaceholder, other.errorPlaceholder) && placeholderId == other.placeholderId && Util.bothNullOrEqual(placeholderDrawable, other.placeholderDrawable) && fallbackId == other.fallbackId && Util.bothNullOrEqual(fallbackDrawable, other.fallbackDrawable) && isCacheable == other.isCacheable && overrideHeight == other.overrideHeight && overrideWidth == other.overrideWidth && isTransformationRequired == other.isTransformationRequired && isTransformationAllowed == other.isTransformationAllowed && useUnlimitedSourceGeneratorsPool == other.useUnlimitedSourceGeneratorsPool && onlyRetrieveFromCache == other.onlyRetrieveFromCache && diskCacheStrategy.equals(other.diskCacheStrategy) && priority == other.priority && options.equals(other.options) && transformations.equals(other.transformations) && resourceClass.equals(other.resourceClass) && Util.bothNullOrEqual(signature, other.signature) && Util.bothNullOrEqual(theme, other.theme); } return false; }
@SuppressWarnings({"PMD.SimplifyBooleanReturns", "RedundantIfStatement"}) @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } MediaStoreSignature that = (MediaStoreSignature) o; if (dateModified != that.dateModified) { return false; } if (orientation != that.orientation) { return false; } if (!Util.bothNullOrEqual(mimeType, that.mimeType)) { return false; } return true; }
@SuppressWarnings({"PMD.SimplifyBooleanReturns", "RedundantIfStatement"}) @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } MultiClassKey that = (MultiClassKey) o; if (!first.equals(that.first)) { return false; } if (!second.equals(that.second)) { return false; } if (!Util.bothNullOrEqual(third, that.third)) { return false; } return true; }
@Override public boolean equals(Object o) { if (o instanceof ResourceCacheKey) { ResourceCacheKey other = (ResourceCacheKey) o; return height == other.height && width == other.width && Util.bothNullOrEqual(transformation, other.transformation) && decodedResourceClass.equals(other.decodedResourceClass) && sourceKey.equals(other.sourceKey) && signature.equals(other.signature) && options.equals(other.options); } return false; }