public final class GradientPaintKey extends Object
GradientPaint
that can be used as the key for
a Map
(including a HashMap
). This class is used
internally by SVGGraphics2D
to track and re-use gradient
definitions. GradientPaint
itself does not implement the
equals() and hashCode() methods, so it doesn't make a good key for a
Map
.Constructor and Description |
---|
GradientPaintKey(GradientPaint paint)
Creates a new instance based on the specified
paint . |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj)
Checks this instance for equality with an arbitrary object.
|
GradientPaint |
getPaint()
Returns the
GradientPaint that was supplied to the
constructor. |
int |
hashCode()
Returns a hash code for this instance.
|
public GradientPaintKey(GradientPaint paint)
paint
.paint
- the paint (null
not permitted).public GradientPaint getPaint()
GradientPaint
that was supplied to the
constructor.GradientPaint
(never null
).public boolean equals(Object obj)
Copyright © 2021. All rights reserved.