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.
-
Element(String, Object)
- Creates a new Element with the key and value.
-
equals(Object)
- Compares two elements.
-
getKey()
- Returns the key.
-
getValue()
- Returns the value, which may be null.
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.
getKey
public String getKey()
- Returns the key.
- Returns:
- the key.
getValue
public Object getValue()
- Returns the value, which may be null.
- Returns:
- the value.
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