Class DefaultKeyedValue<K extends Comparable<K>>
java.lang.Object
org.jfree.data.DefaultKeyedValue<K>
- Type Parameters:
K- the key type (Stringis a good default).
- All Implemented Interfaces:
Serializable, Cloneable, PublicCloneable, KeyedValue<K>, Value
public class DefaultKeyedValue<K extends Comparable<K>>
extends Object
implements KeyedValue<K>, Cloneable, PublicCloneable, Serializable
A (key, value) pair. This class provides a default implementation of the
KeyedValue interface.- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()Returns a clone.booleanTests this key-value pair for equality with an arbitrary object.getKey()Returns the key.getValue()Returns the value.inthashCode()Returns a hash code.voidSets the value.toString()Returns a string representing this instance, primarily useful for debugging.
-
Field Details
-
serialVersionUID
private static final long serialVersionUIDFor serialization.- See Also:
-
key
The key. -
value
The value.
-
-
Constructor Details
-
DefaultKeyedValue
-
-
Method Details
-
getKey
Returns the key.- Specified by:
getKeyin interfaceKeyedValue<K extends Comparable<K>>- Returns:
- The key (never
null).
-
getValue
-
setValue
-
equals
-
hashCode
-
clone
Returns a clone. It is assumed that both the key and value are immutable objects, so only the references are cloned, not the objects themselves.- Specified by:
clonein interfacePublicCloneable- Overrides:
clonein classObject- Returns:
- A clone.
- Throws:
CloneNotSupportedException- Not thrown by this class, but subclasses (if any) might.
-
toString
-