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

Field Summary
private  OneArgFunc myOptWrapped
           
(package private) static long serialVersionUID
           
 
Fields inherited from interface org.erights.e.elib.serial.PassByProxy
HONORARY, HONORED_NAMES
 
Fields inherited from interface org.erights.e.elib.serial.Persistent
HONORARY, HONORED_NAMES
 
Constructor Summary
Once(OneArgFunc wrapped)
          Enabled: Makes an object that will only forward one run/1 message to wrapped.
 
Method Summary
 Object run(Object arg)
          Enabled:
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

serialVersionUID

static final long serialVersionUID

myOptWrapped

private OneArgFunc myOptWrapped
Constructor Detail

Once

public Once(OneArgFunc wrapped)
Enabled: Makes an object that will only forward one run/1 message to wrapped.

Method Detail

run

public Object run(Object arg)
Enabled:

Specified by:
run in interface OneArgFunc


comments?