| org.jfree.data.KeyedValues
All known Subclasses: org.jfree.data.DefaultKeyedValues,
KeyedValues | public interface KeyedValues extends Values(Code) | | An ordered list of (key, value) items where the keys are unique and
non-null .
See Also: Values See Also: DefaultKeyedValues |
Method Summary | |
public int | getIndex(Comparable key) Returns the index for a given key.
Parameters: key - the key (null not permitted). | public Comparable | getKey(int index) Returns the key associated with the item at a given position. | public List | getKeys() Returns the keys for the values in the collection. | public Number | getValue(Comparable key) Returns the value for a given key.
Parameters: key - the key. |
getIndex | public int getIndex(Comparable key)(Code) | | Returns the index for a given key.
Parameters: key - the key (null not permitted). The index, or -1 if the key is unrecognised. throws: IllegalArgumentException - if key is null . |
getKey | public Comparable getKey(int index)(Code) | | Returns the key associated with the item at a given position. Note
that some implementations allow re-ordering of the data items, so the
result may be transient.
Parameters: index - the item index (in the range 0 to getItemCount() - 1 ). The key (never null ). throws: IndexOutOfBoundsException - if index is not in the specified range. |
getKeys | public List getKeys()(Code) | | Returns the keys for the values in the collection. Note that you can
access the values in this collection by key or by index. For this
reason, the key order is important - this method should return the keys
in order. The returned list may be unmodifiable.
The keys (never null ). |
|
|