org.erights.e.elib.util
Class Once
java.lang.Object
|
+--org.erights.e.elib.util.Once
- All Implemented Interfaces:
- Marker, OneArgFunc, PassByProxy, Persistent, Serializable
- public class Once
- extends Object
- implements OneArgFunc, PassByProxy, Persistent
Untamed: An encapsulating forwarder around a OneArgFunc that only passes the first
call through.
Since the wrapped OneArgFunc may be Persistent, we should be Persistent.
Since we are encapsulating, we cannot be PassByConstruction, but should be
PassByProxy.
- Author:
- Mark S. Miller
- See Also:
- Serialized Form
Constructor Summary |
Once(OneArgFunc wrapped)
Enabled: Makes an object that will only forward one run/1 message to wrapped. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
serialVersionUID
static final long serialVersionUID
myOptWrapped
private OneArgFunc myOptWrapped
Once
public Once(OneArgFunc wrapped)
- Enabled: Makes an object that will only forward one run/1 message to wrapped.
run
public Object run(Object arg)
- Enabled:
- Specified by:
run
in interface OneArgFunc
comments?