- java.lang.Object
-
- org.jfree.svg.util.RadialGradientPaintKey
-
public class RadialGradientPaintKey extends java.lang.ObjectA wrapper for aRadialGradientPaintthat can be used as the key for aMap(including aHashMap). This class is used internally bySVGGraphics2Dto track and re-use gradient definitions.GradientPaintitself does not implement theequals()andhashCode()methods, so it doesn't make a good key for aMap.
-
-
Field Summary
Fields Modifier and Type Field Description private java.awt.RadialGradientPaintpaint
-
Constructor Summary
Constructors Constructor Description RadialGradientPaintKey(java.awt.RadialGradientPaint rgp)Creates a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)Tests this instance for equality with an arbitrary object.java.awt.RadialGradientPaintgetPaint()Returns theRadialGradientPaintthat was supplied to the constructor.inthashCode()Returns a hash code for this instance.
-
-
-
Method Detail
-
getPaint
public java.awt.RadialGradientPaint getPaint()
Returns theRadialGradientPaintthat 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:
equalsin classjava.lang.Object- Parameters:
obj- the object to test (nullpermitted).- Returns:
- A boolean.
-
hashCode
public int hashCode()
Returns a hash code for this instance.- Overrides:
hashCodein classjava.lang.Object- Returns:
- A hash code.
-
-