gumbo.interact
Class Interactors.ImmutableInteractorState

java.lang.Object
  |
  +--gumbo.util.GumboCollections.ImmutableCollection
        |
        +--gumbo.util.state.States.ImmutableStateSet
              |
              +--gumbo.interact.Interactors.ImmutableInteractorState
All Implemented Interfaces:
java.util.Collection, InteractorState, java.util.Set, StateSet
Enclosing class:
Interactors

public static class Interactors.ImmutableInteractorState
extends States.ImmutableStateSet
implements InteractorState

Immutable wrapper for a target interactor state. Identity (hashCode(), equals()) forwards to the target object, which is possible because target identity is based on contents.


Constructor Summary
Interactors.ImmutableInteractorState(InteractorState target)
           
 
Method Summary
 InteractorState getInteractorState()
          Gets a singleton immutable view of this state, which is the current state value, resulting from the last reset or transit.
 StateSetField.EventIn getStateChangeIn()
          Calls change() with the received state flags (a "masked change").
 CollectionField.EventIn getStateResetIn()
          Calls reset() with the received state flags.
 StateSetField.EventOut getStateResetOut()
          Sends an immutable view of this state set when the state resets, whether or not the state value changed.
 CollectionField.EventIn getStateSetIn()
          Calls set() with the received state flags.
 StateSetField.EventOut getStateTransitOut()
          Sends an immutable view of this state set when the state transits (as a result of set(), change(), transit()), whether or not the state value changed.
 
Methods inherited from class gumbo.util.state.States.ImmutableStateSet
change, change, changeAll, getOldState, getStatePolicy, getStateSet, reset, set, transit
 
Methods inherited from class gumbo.util.GumboCollections.ImmutableCollection
add, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface gumbo.util.state.StateSet
change, change, changeAll, getOldState, getStatePolicy, getStateSet, reset, set, transit
 
Methods inherited from interface java.util.Set
add, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray
 

Constructor Detail

Interactors.ImmutableInteractorState

public Interactors.ImmutableInteractorState(InteractorState target)
Method Detail

getInteractorState

public InteractorState getInteractorState()
Description copied from interface: InteractorState
Gets a singleton immutable view of this state, which is the current state value, resulting from the last reset or transit.

Specified by:
getInteractorState in interface InteractorState
Returns:
The view (Object). Never null.

getStateChangeIn

public StateSetField.EventIn getStateChangeIn()
Description copied from interface: InteractorState
Calls change() with the received state flags (a "masked change").

Specified by:
getStateChangeIn in interface InteractorState

getStateResetIn

public CollectionField.EventIn getStateResetIn()
Description copied from interface: InteractorState
Calls reset() with the received state flags.

Specified by:
getStateResetIn in interface InteractorState

getStateResetOut

public StateSetField.EventOut getStateResetOut()
Description copied from interface: InteractorState
Sends an immutable view of this state set when the state resets, whether or not the state value changed. Sent just after stateReset() is called.

Specified by:
getStateResetOut in interface InteractorState

getStateSetIn

public CollectionField.EventIn getStateSetIn()
Description copied from interface: InteractorState
Calls set() with the received state flags.

Specified by:
getStateSetIn in interface InteractorState

getStateTransitOut

public StateSetField.EventOut getStateTransitOut()
Description copied from interface: InteractorState
Sends an immutable view of this state set when the state transits (as a result of set(), change(), transit()), whether or not the state value changed. Sent just after stateTransit() is called.

Specified by:
getStateTransitOut in interface InteractorState