public class PaintMap extends Object implements Cloneable, Serializable
Comparable
instances with
Paint
instances.
Paint
instances is included in this class.Constructor and Description |
---|
PaintMap()
Creates a new (empty) map.
|
Modifier and Type | Method and Description |
---|---|
void |
clear()
Resets the map to empty.
|
Object |
clone()
Returns a clone of this
PaintMap . |
boolean |
containsKey(Comparable key)
Returns
true if the map contains the specified key, and
false otherwise. |
boolean |
equals(Object obj)
Tests this map for equality with an arbitrary object.
|
Paint |
getPaint(Comparable key)
Returns the paint associated with the specified key, or
null . |
void |
put(Comparable key,
Paint paint)
Adds a mapping between the specified
key and
paint values. |
public Paint getPaint(Comparable key)
null
.key
- the key (null
not permitted).null
.IllegalArgumentException
- if key
is
null
.public boolean containsKey(Comparable key)
true
if the map contains the specified key, and
false
otherwise.key
- the key.true
if the map contains the specified key, and
false
otherwise.public void put(Comparable key, Paint paint)
key
and
paint
values.key
- the key (null
not permitted).paint
- the paint.IllegalArgumentException
- if key
is
null
.public void clear()
public boolean equals(Object obj)
public Object clone() throws CloneNotSupportedException
PaintMap
.clone
in class Object
CloneNotSupportedException
- if any key is not cloneable.Jas4pp 1.5 © Java Analysis Studio for Particle Physics