gishur.core
Class SimpleListItem
java.lang.Object
|
+--gishur.core.BasicListItem
|
+--gishur.core.SimpleListItem
- All Implemented Interfaces:
- java.lang.Cloneable, Cloneable, ControlledCloneable, KeyValueHolder, ListItem, java.io.Serializable
- public class SimpleListItem
- extends BasicListItem
A simple ListItem, which only stores a value. The value can be
changed by setKey(java.lang.Object)
as well as setValue(java.lang.Object)
. Consequently key()
and value()
return the same object.
- Version:
- 1.0
- Author:
- Thomas Wolf
- See Also:
- Serialized Form
Method Summary |
java.lang.Object |
key()
Returns the stored key of the ListItem . |
boolean |
setKey(java.lang.Object key)
Sets the key. |
boolean |
setValue(java.lang.Object object)
Stores the object object as value. |
java.lang.String |
toString()
Overrides Object.toString() . |
java.lang.Object |
value()
Returns the stored value of the ListItem . |
Methods inherited from class gishur.core.BasicListItem |
answerConnect, clearConnections, clone, clone, connect, equals, find, findFirst, findLast, getIndex, getOwningList, isFirst, isLast, next, prev, remove, requestListAccess, setOwningList |
Methods inherited from class java.lang.Object |
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
SimpleListItem
public SimpleListItem()
- Default constructor. The stored value is set to
null
.
SimpleListItem
public SimpleListItem(java.lang.Object key)
- Constructor with initiation of the value.
BasicList.requestAccess(int, java.lang.Object, java.lang.Object)
is
not called this time!
- Parameters:
key
- new value
toString
public java.lang.String toString()
- Overrides
Object.toString()
.
- Overrides:
toString
in class BasicListItem
key
public java.lang.Object key()
- Returns the stored key of the
ListItem
.
- Overrides:
key
in class BasicListItem
- Returns:
- stored key
setKey
public boolean setKey(java.lang.Object key)
- Sets the key.
- Overrides:
setKey
in class BasicListItem
- Parameters:
key
- new key
value
public java.lang.Object value()
- Returns the stored value of the
ListItem
.
- Overrides:
value
in class BasicListItem
- Returns:
- stored object
setValue
public boolean setValue(java.lang.Object object)
- Stores the object
object
as value.
- Overrides:
setValue
in class BasicListItem
- Parameters:
object
- object to de stored