public class

KeyedObject

extends Object
implements Serializable Cloneable
java.lang.Object
   ↳ org.jfree.data.KeyedObject

Class Overview

A (key, object) pair.

Summary

Public Constructors
KeyedObject(Comparable key, Object object)
Creates a new (key, object) pair.
Public Methods
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.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public KeyedObject (Comparable key, Object object)

Creates a new (key, object) pair.

Parameters
key the key.
object the object (null permitted).

Public Methods

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

Returns
  • A clone.
Throws
CloneNotSupportedException if there is a problem cloning.

public boolean equals (Object obj)

Tests if this object is equal to another.

Parameters
obj the other object.
Returns
  • A boolean.

public Comparable getKey ()

Returns the key.

Returns
  • The key.

public Object getObject ()

Returns the object.

Returns
  • The object (possibly null).

public void setObject (Object object)

Sets the object.

Parameters
object the object (null permitted).