Package org.jmanikin.message
Class LocalMessage.LocalEnvironment<I extends Id<O>,O,E>
java.lang.Object
org.jmanikin.message.LocalMessage.LocalEnvironment<I,O,E>
- Type Parameters:
I- the Id TypeO- the Object TypeE- the Effect Type
- All Implemented Interfaces:
Apply<I,O,E>,Effect<I,O,E>,Environment<I,O,E>,Msg<I,O,E>,PostCondition<I,O,E>,PreCondition<I,O,E>
public static class LocalMessage.LocalEnvironment<I extends Id<O>,O,E> extends java.lang.Object implements Environment<I,O,E>, PreCondition<I,O,E>, Apply<I,O,E>, Effect<I,O,E>, PostCondition<I,O,E>, Msg<I,O,E>
LocalEnvironment implementation that sets the ThreadLocal variable at each Stage.
-
Constructor Summary
Constructors Constructor Description LocalEnvironment(Environment<I,O,E> env) -
Method Summary
Modifier and Type Method Description java.util.function.Supplier<O>app()Returns the lazy Object O supplier that was build by the builder.Effect<I,O,E>app(java.util.function.Supplier<O> app)Build the next Effect stage, given a lazy Object O supplier.java.util.function.Supplier<E>eff()Returns the lazy Effect E supplier that was build by the builder.PostCondition<I,O,E>eff(java.util.function.Supplier<E> eff)Build the next post-condition stage, given a lazy effect R supplier.Oobj()Returns the current Object O<O2> O2obj(Id<? extends O2> id)Returns the current Object O2, given its idOold()Returns the old Object O<O2> O2old(Id<? extends O2> id)Returns the old Object O2, given its idjava.util.function.Supplier<java.lang.Boolean>pre()Returns the lazy pre-condition supplier that was build by the builder.Apply<I,O,E>pre(java.util.function.Supplier<java.lang.Boolean> pre)Build the next Apply stage, given a lazy pre-condition supplier.java.util.function.Supplier<java.lang.Boolean>pst()Returns the lazy post-condition supplier that was build by the builder.Msg<I,O,E>pst(java.util.function.Supplier<java.lang.Boolean> pst)Build the next Msg stage, given a lazy post-condition supplier.Iself()Returns the Object identifier that's in scope<I2 extends Id<O2>, O2, R2>
R2send(I2 id, Message<I2,O2,R2> msg)Sends a Message to Object O, given an Object identifierMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
LocalEnvironment
-
-
Method Details
-
self
Description copied from interface:EnvironmentReturns the Object identifier that's in scope -
obj
Description copied from interface:EnvironmentReturns the current Object O -
old
Description copied from interface:EnvironmentReturns the old Object O -
obj
Description copied from interface:EnvironmentReturns the current Object O2, given its id -
old
Description copied from interface:EnvironmentReturns the old Object O2, given its id -
send
Description copied from interface:EnvironmentSends a Message to Object O, given an Object identifier -
pre
Description copied from interface:PreConditionBuild the next Apply stage, given a lazy pre-condition supplier. -
app
Description copied from interface:ApplyBuild the next Effect stage, given a lazy Object O supplier. -
eff
Description copied from interface:EffectBuild the next post-condition stage, given a lazy effect R supplier. -
pst
Description copied from interface:PostConditionBuild the next Msg stage, given a lazy post-condition supplier. -
pre
public java.util.function.Supplier<java.lang.Boolean> pre()Description copied from interface:MsgReturns the lazy pre-condition supplier that was build by the builder. -
app
Description copied from interface:MsgReturns the lazy Object O supplier that was build by the builder. -
eff
Description copied from interface:MsgReturns the lazy Effect E supplier that was build by the builder. -
pst
public java.util.function.Supplier<java.lang.Boolean> pst()Description copied from interface:MsgReturns the lazy post-condition supplier that was build by the builder.
-