public class DefaultKeyedValue extends Object implements KeyedValue, Cloneable, org.jfree.util.PublicCloneable, Serializable
KeyedValue
interface.Constructor and Description |
---|
DefaultKeyedValue(Comparable key,
Number value)
Creates a new (key, value) item.
|
Modifier and Type | Method and Description |
---|---|
Object |
clone()
Returns a clone.
|
boolean |
equals(Object obj)
Tests this key-value pair for equality with an arbitrary object.
|
Comparable |
getKey()
Returns the key.
|
Number |
getValue()
Returns the value.
|
int |
hashCode()
Returns a hash code.
|
void |
setValue(Number value)
Sets the value.
|
String |
toString()
Returns a string representing this instance, primarily useful for
debugging.
|
public DefaultKeyedValue(Comparable key, Number value)
key
- the key (should be immutable, null
not
permitted).value
- the value (null
permitted).public Comparable getKey()
getKey
in interface KeyedValue
null
).public Number getValue()
public void setValue(Number value)
value
- the value (null
permitted).public boolean equals(Object obj)
public int hashCode()
public Object clone() throws CloneNotSupportedException
clone
in interface org.jfree.util.PublicCloneable
clone
in class Object
CloneNotSupportedException
- Not thrown by this class, but
subclasses (if any) might.Jas4pp 1.5 © Java Analysis Studio for Particle Physics