Package org.jfree.data
Class KeyedObject
java.lang.Object
org.jfree.data.KeyedObject
- All Implemented Interfaces:
Serializable,Cloneable,PublicCloneable
A (key, object) pair.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionKeyedObject(Comparable key, Object object) Creates a new (key, object) pair. -
Method Summary
-
Constructor Details
-
KeyedObject
Creates a new (key, object) pair.- Parameters:
key- the key.object- the object (nullpermitted).
-
-
Method Details
-
getKey
Returns the key.- Returns:
- The key.
-
getObject
Returns the object.- Returns:
- The object (possibly
null).
-
setObject
Sets the object.- Parameters:
object- the object (nullpermitted).
-
clone
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.
-
equals
Tests if this object is equal to another.
-