Interface State.Group

Enclosing interface:
State

public static interface State.Group
A State.Group deactivates all other states when a state in the group is activated. State.Group works with WeakReference so adding states does not prevent them from being garbage collected.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    add(State state)
    Adds a state to this State.Group via a WeakReference, so it does not prevent it from being garbage collected.
    void
    add(Collection<State> states)
    Adds the given states to this State.Group via a WeakReference, so it does not prevent it from being garbage collected.
  • Method Details

    • add

      void add(State state)
      Adds a state to this State.Group via a WeakReference, so it does not prevent it from being garbage collected. Adding an active state deactivates all other states in the group.
      Parameters:
      state - the State instance to add
    • add

      void add(Collection<State> states)
      Adds the given states to this State.Group via a WeakReference, so it does not prevent it from being garbage collected. Adding an active state deactivates all other states in the group.
      Parameters:
      states - the State instances to add