public class RadialGradientPaintKey
extends java.lang.Object
RadialGradientPaint
that can be used as the key
for a HashMap
. This class is used internally by
PDFGraphics2D
to track and re-use gradient definitions.
RadialGradientPaint
itself does not implement the equals()
and hashCode()
methods, so it doesn't make a good key for a
Map
.Constructor and Description |
---|
RadialGradientPaintKey(java.awt.RadialGradientPaint rgp)
Creates a new key instance.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj)
Tests this instance for equality with an arbitrary object.
|
java.awt.RadialGradientPaint |
getPaint()
Returns the
RadialGradientPaint that was supplied to the
constructor. |
int |
hashCode()
Returns a hash code for this instance.
|
public RadialGradientPaintKey(java.awt.RadialGradientPaint rgp)
rgp
- the radial gradient paint (null
not permitted).public java.awt.RadialGradientPaint getPaint()
RadialGradientPaint
that was supplied to the
constructor.RadialGradientPaint
(never null
).public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
obj
- the object to test (null
permitted).public int hashCode()
hashCode
in class java.lang.Object