Example usage for org.springframework.statemachine.config.model StateData getRegion

List of usage examples for org.springframework.statemachine.config.model StateData getRegion

Introduction

In this page you can find the example usage for org.springframework.statemachine.config.model StateData getRegion.

Prototype

public Object getRegion() 

Source Link

Document

Gets the region.

Usage

From source file:org.springframework.statemachine.config.AbstractStateMachineFactory.java

private Collection<Collection<StateData<S, E>>> splitIntoRegions(Collection<StateData<S, E>> stateDatas) {
    Map<Object, Collection<StateData<S, E>>> map = new HashMap<Object, Collection<StateData<S, E>>>();
    for (StateData<S, E> stateData : stateDatas) {
        Collection<StateData<S, E>> c = map.get(stateData.getRegion());
        if (c == null) {
            c = new ArrayList<StateData<S, E>>();
        }/*from   w  w  w.  j av a  2s . c om*/
        c.add(stateData);
        map.put(stateData.getRegion(), c);
    }
    return map.values();
}