net.sourceforge.xwing
Class WeakSourceSink
java.lang.Object
net.sourceforge.xwing.AbstractSourceSink
net.sourceforge.xwing.WeakSourceSink
- All Implemented Interfaces:
- SourceSink
- public class WeakSourceSink
- extends AbstractSourceSink
A SourceSink that acts as a proxy to another SourceSink.
The change listener that attaches the other SourceSink back
to this one is implemented via a WeakReference so that this
SourceSink may be garbage collected even if the other SourceSink
is still reachable.
- Version:
- $Revision: 1.2 $
- Author:
- Scott Howlett
Method Summary |
Object |
get()
Retrieve some value. |
void |
set(Object newValue)
Store some value. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
WeakSourceSink
public WeakSourceSink(SourceSink ss)
- Create a new WeakSourceSink.
- Parameters:
ss
- the SourceSink that values are read from and written to.
get
public Object get()
- Description copied from interface:
SourceSink
- Retrieve some value.
- Returns:
- a value.
set
public void set(Object newValue)
- Description copied from interface:
SourceSink
- Store some value.
- Parameters:
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.
Copyright © 2003 The Xwing Project. All Rights Reserved.