Package com.orsonpdf.util
Class GradientPaintKey
- java.lang.Object
-
- com.orsonpdf.util.GradientPaintKey
-
public final class GradientPaintKey extends java.lang.ObjectA wrapper for aGradientPaintthat can be used as the key for aHashMap. This class is used internally byPDFGraphics2Dto 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.GradientPaintpaint
-
Constructor Summary
Constructors Constructor Description GradientPaintKey(java.awt.GradientPaint paint)Creates a new instance based on the specifiedpaint.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)Checks this instance for equality with an arbitrary object.java.awt.GradientPaintgetPaint()Returns theGradientPaintthat was supplied to the constructor.inthashCode()Returns a hash code for this instance.
-
-
-
Method Detail
-
getPaint
public java.awt.GradientPaint getPaint()
Returns theGradientPaintthat was supplied to the constructor.- Returns:
- The
GradientPaint(nevernull).
-
equals
public boolean equals(java.lang.Object obj)
Checks this instance for equality with an arbitrary object.- Overrides:
equalsin classjava.lang.Object- Parameters:
obj- the object to test against (nullpermitted).- Returns:
- A boolean.
-
hashCode
public int hashCode()
Returns a hash code for this instance.- Overrides:
hashCodein classjava.lang.Object- Returns:
- A hash code.
-
-