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.- Version:
- 1.0
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static boolean
equals
(ColorModel cm1, ColorModel cm2) Returnstrue
if the given color models are equal.boolean
For internal use only.int
hashCode()
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
Returnstrue
if the given color models are equal. TheColorModel
class defines anequals
method, 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:
true
if the two color models are equal.
-
equals
For internal use only. -
hashCode
public int hashCode()For internal use only.
-