Equals method for DiscreteAlphaIndexColorModel, needed for Java 10.

(cherry picked from commit b86bad2bf9)
This commit is contained in:
Harald Kuhr
2018-10-11 22:36:41 +02:00
parent 230ac33283
commit c9e2e21727

View File

@@ -153,6 +153,12 @@ public final class DiscreteAlphaIndexColorModel extends ColorModel {
(raster.getNumBands() == 2) && ((1 << size) >= icm.getMapSize()));
}
@Override
public boolean equals(Object obj) {
return this == obj
|| obj != null && getClass() == obj.getClass() && icm.equals(((DiscreteAlphaIndexColorModel) obj).icm);
}
public String toString() {
return "DiscreteAlphaIndexColorModel: #pixelBits = " + pixel_bits
+ " numComponents = " + getNumComponents()