Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.jfree.data
Class KeyedObject

    java.lang.Object
      org.jfree.data.KeyedObject

All Implemented Interfaces:
  java.lang.Cloneable, org.jfree.util.PublicCloneable, java.io.Serializable

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

A (key, object) pair.

See Also:
  Serialized Form

Constructor Summary
`KeyedObject(java.lang.Comparable key, java.lang.Object object)` Creates a new (key, object) pair.

Method Summary
`java.lang.Object` | `clone()` Returns a clone of this object.
`boolean` | `equals(java.lang.Object object)` Tests if this object is equal to another.
`java.lang.Comparable` | `getKey()` Returns the key.
`java.lang.Object` | `getObject()` Returns the object.
`void` | `setObject(java.lang.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(java.lang.Comparable key,
                       java.lang.Object object)

  Creates a new (key, object) pair.

Parameters:
  `key` - the key.
  `object` - the object (`null` permitted).

Method Detail

### getKey

    public java.lang.Comparable getKey()

  Returns the key.

  Returns:
    The key.

### getObject

    public java.lang.Object getObject()

  Returns the object.

  Returns:
    The object (possibly `null`).

### setObject

    public void setObject(java.lang.Object object)

  Sets the object.

  Parameters:
    `object` - the object (`null` permitted).

### clone

    public java.lang.Object clone()
                           throws java.lang.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`
  Returns:
    A clone.
  Throws:
    `java.lang.CloneNotSupportedException` - if there is a problem cloning.

### equals

    public boolean equals(java.lang.Object object)

  Tests if this object is equal to another.

  Parameters:
    `object` - the other object.
  Returns:
    A boolean.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD