Class ColorModelPatch<T extends ColorModel>
java.lang.Object
org.apache.sis.internal.coverage.j2d.ColorModelPatch<T>
@Workaround(library="JDK",
version="8")
final class ColorModelPatch<T extends ColorModel>
extends Object
Workaround for broken
ColorModel.equals(Object) in Java 8 and before.
This workaround will be removed after upgrade to Java 9.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static booleanequals(ColorModel cm1, ColorModel cm2) Returnstrueif the given color models are equal.booleanFor internal use only.inthashCode()For internal use only.
-
Field Details
-
cm
The color model to share.
-
-
Constructor Details
-
ColorModelPatch
ColorModelPatch(T cm) For internal use only.
-
-
Method Details
-
equals
Returnstrueif the given color models are equal. TheColorModelclass defines anequalsmethod, but as of Java 6 that method does not compare every attributes. For example, it does not compare the color space and the transfer type, so we have to compare them here.- Parameters:
cm1- the first color model.cm2- the second color model.- Returns:
trueif the two color models are equal.
-
equals
For internal use only. -
hashCode
public int hashCode()For internal use only.
-