org.jfree.data
public class KeyedObjects extends Object implements Cloneable, PublicCloneable, Serializable
Constructor Summary | |
---|---|
KeyedObjects()
Creates a new collection (initially empty). |
Method Summary | |
---|---|
void | addObject(Comparable key, Object object)
Adds a new object to the collection, or overwrites an existing object.
|
Object | clone()
Returns a clone of this object.
|
boolean | equals(Object o)
Tests if this object is equal to another.
|
int | getIndex(Comparable key)
Returns the index for a given key.
|
int | getItemCount()
Returns the number of items (values) in the collection.
|
Comparable | getKey(int index)
Returns a key.
|
List | getKeys()
Returns the keys.
|
Object | getObject(int item)
Returns an object.
|
Object | getObject(Comparable key)
Returns the object for a given key. |
void | removeValue(int index)
Removes a value from the collection.
|
void | removeValue(Comparable key)
Removes a value from the collection.
|
void | setObject(Comparable key, Object object)
Replaces an existing object, or adds a new object to the collection.
|
Parameters: key the key. object the object.
Returns: A clone.
Throws: CloneNotSupportedException if there is a problem cloning.
Parameters: o the other object.
Returns: A boolean.
Parameters: key the key.
Returns: The index, or -1
if the key is unrecognised.
Returns: The item count.
Parameters: index the item index (zero-based).
Returns: The row key.
Throws: IndexOutOfBoundsException if index
is out of bounds.
Returns: The keys (never null
).
Parameters: item the item index (zero-based).
Returns: The object (null
if the index is out of range).
null
.
Parameters: key the key.
Returns: The object (possibly null
).
Parameters: index the index of the item to remove.
Parameters: key the key of the item to remove.
Parameters: key the key. object the object.