org.erights.e.elib.slot
Class SettableGuard

java.lang.Object
  |
  +--org.erights.e.elib.slot.BaseGuard
        |
        +--org.erights.e.elib.slot.SettableGuard
All Implemented Interfaces:
Guard, SlotGuard, ValueGuard

public final class SettableGuard
extends BaseGuard

Safe: The canonical instance is bound to "settable" in the initial environment, and makes SettableSlots that coerce through an optionally provided ValueGuard argument.

"settable" used as a SlotGuard makes a SimpleSlot.

"settable(valueGuard)" returns a SlotGuard (really, another instance of SettableGuard, though no one should care), that makes SettableSlots that coerce using valueGuard.

Author:
Mark S. Miller

Field Summary
static SettableGuard THE_ONE
          Enabled: The canonical instance
 
Fields inherited from class org.erights.e.elib.slot.BaseGuard
myOptValueGuard
 
Constructor Summary
private SettableGuard()
           
 
Method Summary
 Guard run(ValueGuard valueGuard)
          Enabled: Makes a Guard that makes settable slots that coerces according to the valueGuard argument.
 
Methods inherited from class org.erights.e.elib.slot.BaseGuard
__printOn, accepts, and, butNot, coerce, coerce, get, getName, makeSlot, makeSlot, not, or, toString, xor
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

THE_ONE

public static final SettableGuard THE_ONE
Enabled: The canonical instance

Constructor Detail

SettableGuard

private SettableGuard()
Method Detail

run

public Guard run(ValueGuard valueGuard)
Enabled: Makes a Guard that makes settable slots that coerces according to the valueGuard argument.

run is used from E to define new Guards as extensions of settable(self), where self is the sub-object being defined to provide ValueGuard behavior.



comments?