All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class uhr.core.tron.Element

java.lang.Object
   |
   +----uhr.core.tron.Element

public class Element
extends Object
This class is a single element of data in a collection. An Element is immutable.


Constructor Index

 o Element(String, Object)
Creates a new Element with the key and value.

Method Index

 o equals(Object)
Compares two elements.
 o getKey()
Returns the key.
 o getValue()
Returns the value, which may be null.

Constructors

 o Element
 public Element(String key,
                Object value)
Creates a new Element with the key and value.

Parameters:
key - the key, which should not be null.
value - the value, which may be null.
Throws: IllegalArgumentException
if the key is null.

Methods

 o getKey
 public String getKey()
Returns the key.

Returns:
the key.
 o getValue
 public Object getValue()
Returns the value, which may be null.

Returns:
the value.
 o equals
 public boolean equals(Object object)
Compares two elements. The result is true if and only if the argument is not null and is an Element object that represents the same key and value as this object.

Parameters:
object - the object to compare with.
Returns:
true if the objects are the same; false otherwise.
Overrides:
equals in class Object

All Packages  Class Hierarchy  This Package  Previous  Next  Index