public class LinearGradientPaintKey extends Object
LinearGradientPaint
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. LinearGradientPaint
itself does not implement the
equals()
and hashCode()
methods, so it doesn't make a good
key for a Map
.Constructor and Description |
---|
LinearGradientPaintKey(LinearGradientPaint lgp)
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj)
Tests this instance for equality with an arbitrary object.
|
LinearGradientPaint |
getPaint()
Returns the
LinearGradientPaint that was supplied to the
constructor. |
int |
hashCode()
Returns a hash code for this instance.
|
public LinearGradientPaintKey(LinearGradientPaint lgp)
lgp
- the linear gradient paint (null
not permitted).public LinearGradientPaint getPaint()
LinearGradientPaint
that was supplied to the
constructor.LinearGradientPaint
(never null
).Copyright © 2021. All rights reserved.