Spring Web Flow

org.springframework.webflow.engine
Class TransitionSet

java.lang.Object
  extended by org.springframework.webflow.engine.TransitionSet
All Implemented Interfaces:
java.lang.Iterable<Transition>

public class TransitionSet
extends java.lang.Object
implements java.lang.Iterable<Transition>

A typed set of transitions for use internally by artifacts that can apply transition execution logic.

Author:
Keith Donald
See Also:
TransitionableState.getTransitionSet(), Flow.getGlobalTransitionSet()

Constructor Summary
TransitionSet()
           
 
Method Summary
 boolean add(Transition transition)
          Add a transition to this set.
 boolean addAll(Transition... transitions)
          Add a collection of transition instances to this set.
 boolean contains(Transition transition)
          Tests if this transition is in this set.
 Transition getTransition(RequestContext context)
          Gets a transition for given flow execution request context.
 TransitionCriteria[] getTransitionCriterias()
          Returns a list of the supported transitional criteria used to match transitions in this state.
 boolean hasMatchingTransition(RequestContext context)
          Returns whether or not this list has a transition that will fire for given flow execution request context.
 java.util.Iterator<Transition> iterator()
          Returns an iterator over this transition set.
 boolean remove(Transition transition)
          Remove the transition instance from this set.
 int size()
          Returns the size of this transition set.
 Transition[] toArray()
          Convert this set to a typed transition array.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TransitionSet

public TransitionSet()
Method Detail

add

public boolean add(Transition transition)
Add a transition to this set.

Parameters:
transition - the transition to add
Returns:
true if this set's contents changed as a result of the add operation

addAll

public boolean addAll(Transition... transitions)
Add a collection of transition instances to this set.

Parameters:
transitions - the transitions to add
Returns:
true if this set's contents changed as a result of the add operation

contains

public boolean contains(Transition transition)
Tests if this transition is in this set.

Parameters:
transition - the transition
Returns:
true if the transition is contained in this set, false otherwise

remove

public boolean remove(Transition transition)
Remove the transition instance from this set.

Parameters:
transition - the transition to remove
Returns:
true if this list's contents changed as a result of the remove operation

size

public int size()
Returns the size of this transition set.

Returns:
the exception handler set size

iterator

public java.util.Iterator<Transition> iterator()
Returns an iterator over this transition set.

Specified by:
iterator in interface java.lang.Iterable<Transition>
Returns:
an iterator

toArray

public Transition[] toArray()
Convert this set to a typed transition array.

Returns:
the transition set as a typed array

getTransitionCriterias

public TransitionCriteria[] getTransitionCriterias()
Returns a list of the supported transitional criteria used to match transitions in this state.

Returns:
the list of transitional criteria

getTransition

public Transition getTransition(RequestContext context)
Gets a transition for given flow execution request context. The first matching transition will be returned.

Parameters:
context - a flow execution context
Returns:
the transition, or null if no transition matches

hasMatchingTransition

public boolean hasMatchingTransition(RequestContext context)
Returns whether or not this list has a transition that will fire for given flow execution request context.

Parameters:
context - a flow execution context

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

Spring Web Flow