|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sourceforge.xwing.AbstractSourceSink
net.sourceforge.xwing.SimpleSourceSink
A SourceSink that internally stores any arbitrary Object as its value. If a new value is set via set(), a ChangeEvent wil be broadcast. If the value's internal state changes, though, no event will be broadcast because we have no generic way of knowing if that has happened.
Constructor Summary | |
SimpleSourceSink()
Create a new SimpleSourceSink with a null value. |
|
SimpleSourceSink(Object initialValue)
Create a new SimpleSourceSink with the specified value. |
Method Summary | |
Object |
get()
Return our stored value. |
void |
set(Object newValue)
Set our stored value and fire a ChangeEvent to all listeners. |
Methods inherited from class net.sourceforge.xwing.AbstractSourceSink |
addChangeListener, fireStateChanged, removeChangeListener |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public SimpleSourceSink()
public SimpleSourceSink(Object initialValue)
initialValue
- The initial value.Method Detail |
public Object get()
public void set(Object newValue)
newValue
- The value to be stored. In general, if a value
is stored via set(), the value retrieved by a subsequent
get() call will equal the set value as defined by the value's
equals() method.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |