|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||
be.lassi.base
Class Holder<E>
java.lang.Objectbe.lassi.base.AbstractHolder
be.lassi.base.Holder<E>
- Type Parameters:
E- the type of object that is wrapped by this value holder
- All Implemented Interfaces:
- NamedValue, java.io.Serializable
- Direct Known Subclasses:
- StringHolder
public class Holder<E>
- extends AbstractHolder
Generic implementation of an object value holder.
- See Also:
- Serialized Form
| Constructor Summary | |
|---|---|
Holder()
Constructs a new instance. |
|
Holder(java.lang.String name)
Constructs a new instance. |
|
Holder(java.lang.String name,
E value)
Constructs a new instance on given value. |
|
| Method Summary | |
|---|---|
void |
add(Listener listener)
Adds a new listener. |
boolean |
equals(java.lang.Object object)
|
java.lang.String |
getStringValue()
Gets the value in string format. |
E |
getValue()
Gets the value. |
int |
hashCode()
|
void |
printListeners()
Prints the listeners on stdout. |
void |
remove(Listener listener)
Removes given listener. |
void |
setStringValue(java.lang.String newValue)
Sets the value in string format. |
void |
setValue(E value2)
Sets a new value. |
void |
setValue(E newValue,
Listener doNotNotify)
Sets a new value. |
| Methods inherited from class be.lassi.base.AbstractHolder |
|---|
getName, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
Holder
public Holder()
- Constructs a new instance.
Holder
public Holder(java.lang.String name)
- Constructs a new instance.
- Parameters:
name- the value holder name
Holder
public Holder(java.lang.String name,
E value)
- Constructs a new instance on given value.
- Parameters:
name- the value holder namevalue- the initial value
| Method Detail |
|---|
add
public void add(Listener listener)
- Adds a new listener.
- Parameters:
listener- the listener to be added
equals
public boolean equals(java.lang.Object object)
-
- Overrides:
equalsin classAbstractHolder
getStringValue
public java.lang.String getStringValue()
- Gets the value in string format.
- Returns:
- the value in string format
getValue
public E getValue()
- Gets the value.
- Returns:
- the value
hashCode
public int hashCode()
-
- Overrides:
hashCodein classAbstractHolder
printListeners
public void printListeners()
- Prints the listeners on stdout. Can be usefull for debugging.
remove
public void remove(Listener listener)
- Removes given listener.
- Parameters:
listener- the listener to be removed
setStringValue
public void setStringValue(java.lang.String newValue)
- Sets the value in string format.
- Parameters:
newValue- the value to be set in string format
setValue
public void setValue(E value2)
- Sets a new value.
- Parameters:
value2- the new value to set
setValue
public void setValue(E newValue, Listener doNotNotify)
- Sets a new value.
- Parameters:
newValue- the new value to setdoNotNotify- the listener that does not have to be notified about this value change
|
Lighting Assistant 1.2 | ||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||
