- java.lang.Object
-
- org.jfree.data.KeyedObject<K>
-
- All Implemented Interfaces:
Serializable,Cloneable,PublicCloneable
public class KeyedObject<K extends Comparable<K>> extends Object implements Cloneable, PublicCloneable, Serializable
A (key, object) pair.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description KeyedObject(K key, Object object)Creates a new (key, object) pair.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Objectclone()Returns a clone of this object.booleanequals(Object obj)Tests if this object is equal to another.KgetKey()Returns the key.ObjectgetObject()Returns the object.inthashCode()voidsetObject(Object object)Sets the object.
-
-
-
Constructor Detail
-
KeyedObject
public KeyedObject(K key, Object object)
Creates a new (key, object) pair.- Parameters:
key- the key.object- the object (nullpermitted).
-
-
Method Detail
-
setObject
public void setObject(Object object)
Sets the object.- Parameters:
object- the object (nullpermitted).
-
clone
public Object clone() throws CloneNotSupportedException
Returns a clone of this object. It is assumed that the key is an immutable object, so it is not deep-cloned. The object is deep-cloned if it implementsPublicCloneable, otherwise a shallow clone is made.- Specified by:
clonein interfacePublicCloneable- Overrides:
clonein classObject- Returns:
- A clone.
- Throws:
CloneNotSupportedException- if there is a problem cloning.
-
-