Package com.orsonpdf.util
Class RadialGradientPaintKey
- java.lang.Object
-
- com.orsonpdf.util.RadialGradientPaintKey
-
public class RadialGradientPaintKey extends java.lang.Object
A wrapper for aRadialGradientPaint
that can be used as the key for aHashMap
. This class is used internally byPDFGraphics2D
to track and re-use gradient definitions.RadialGradientPaint
itself does not implement theequals()
andhashCode()
methods, so it doesn't make a good key for aMap
.
-
-
Constructor Summary
Constructors Constructor Description RadialGradientPaintKey(java.awt.RadialGradientPaint rgp)
Creates a new key instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object obj)
Tests this instance for equality with an arbitrary object.java.awt.RadialGradientPaint
getPaint()
Returns theRadialGradientPaint
that was supplied to the constructor.int
hashCode()
Returns a hash code for this instance.
-
-
-
Method Detail
-
getPaint
public java.awt.RadialGradientPaint getPaint()
Returns theRadialGradientPaint
that was supplied to the constructor.- Returns:
- The
RadialGradientPaint
(nevernull
).
-
equals
public boolean equals(java.lang.Object obj)
Tests this instance for equality with an arbitrary object.- Overrides:
equals
in classjava.lang.Object
- Parameters:
obj
- the object to test (null
permitted).- Returns:
- A boolean.
-
hashCode
public int hashCode()
Returns a hash code for this instance.- Overrides:
hashCode
in classjava.lang.Object
- Returns:
- A hash code.
-
-