JFreeChart 1.0.14-redhat-2

org.jfree.data
Class KeyedObject

java.lang.Object
  extended by org.jfree.data.KeyedObject
All Implemented Interfaces:
Serializable, Cloneable, org.jfree.util.PublicCloneable

public class KeyedObject
extends Object
implements Cloneable, org.jfree.util.PublicCloneable, Serializable

A (key, object) pair.

See Also:
Serialized Form

Constructor Summary
KeyedObject(Comparable key, Object object)
          Creates a new (key, object) pair.
 
Method Summary
 Object clone()
          Returns a clone of this object.
 boolean equals(Object obj)
          Tests if this object is equal to another.
 Comparable getKey()
          Returns the key.
 Object getObject()
          Returns the object.
 void setObject(Object object)
          Sets the object.
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

KeyedObject

public KeyedObject(Comparable key,
                   Object object)
Creates a new (key, object) pair.

Parameters:
key - the key.
object - the object (null permitted).
Method Detail

getKey

public Comparable getKey()
Returns the key.

Returns:
The key.

getObject

public Object getObject()
Returns the object.

Returns:
The object (possibly null).

setObject

public void setObject(Object object)
Sets the object.

Parameters:
object - the object (null permitted).

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 implements PublicCloneable, otherwise a shallow clone is made.

Specified by:
clone in interface org.jfree.util.PublicCloneable
Overrides:
clone in class Object
Returns:
A clone.
Throws:
CloneNotSupportedException - if there is a problem cloning.

equals

public boolean equals(Object obj)
Tests if this object is equal to another.

Overrides:
equals in class Object
Parameters:
obj - the other object.
Returns:
A boolean.

JFreeChart 1.0.14-redhat-2

Copyright © 2001-2012 JFree.org. All Rights Reserved.