本文整理了Java中org.springframework.webflow.engine.Flow.getStateCount()
方法的一些代码示例,展示了Flow.getStateCount()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Flow.getStateCount()
方法的具体详情如下:
包路径:org.springframework.webflow.engine.Flow
类名称:Flow
方法名:getStateCount
[英]Returns the number of states defined in this flow.
[中]返回此流中定义的状态数。
代码示例来源:origin: org.springframework.webflow/spring-webflow
/**
* Convenience accessor that returns an ordered array of the String <code>ids</code> for the state definitions
* associated with this flow definition.
* @return the state ids
*/
public String[] getStateIds() {
String[] stateIds = new String[getStateCount()];
int i = 0;
for (State state : states) {
stateIds[i++] = state.getId();
}
return stateIds;
}
代码示例来源:origin: spring-projects/spring-webflow
/**
* Convenience accessor that returns an ordered array of the String <code>ids</code> for the state definitions
* associated with this flow definition.
* @return the state ids
*/
public String[] getStateIds() {
String[] stateIds = new String[getStateCount()];
int i = 0;
for (State state : states) {
stateIds[i++] = state.getId();
}
return stateIds;
}
代码示例来源:origin: org.springframework/spring-webflow
/**
* Convenience accessor that returns an ordered array of the String <code>ids</code> for the state definitions
* associated with this flow definition.
* @return the state ids
*/
public String[] getStateIds() {
String[] stateIds = new String[getStateCount()];
int i = 0;
Iterator it = states.iterator();
while (it.hasNext()) {
stateIds[i++] = ((State) it.next()).getId();
}
return stateIds;
}
代码示例来源:origin: org.springframework.webflow/org.springframework.webflow
/**
* Convenience accessor that returns an ordered array of the String <code>ids</code> for the state definitions
* associated with this flow definition.
* @return the state ids
*/
public String[] getStateIds() {
String[] stateIds = new String[getStateCount()];
int i = 0;
Iterator it = states.iterator();
while (it.hasNext()) {
stateIds[i++] = ((State) it.next()).getId();
}
return stateIds;
}
代码示例来源:origin: org.apereo.cas/cas-server-support-reports
flowDetails.put("states", states);
flowDetails.put("possibleOutcomes", def.getPossibleOutcomes());
flowDetails.put("stateCount", def.getStateCount());
代码示例来源:origin: spring-projects/spring-webflow
public void testAddSameStateTwice() {
Flow flow = new Flow("myFlow");
EndState state = new EndState(flow, "myState1");
try {
flow.add(state);
fail("Should have failed");
} catch (IllegalArgumentException e) {
}
assertEquals("State count wrong:", 1, flow.getStateCount());
}
代码示例来源:origin: spring-projects/spring-webflow
public void testAddStates() {
Flow flow = new Flow("myFlow");
new EndState(flow, "myState1");
new EndState(flow, "myState2");
assertEquals("Wrong start state:", "myState1", flow.getStartState().getId());
assertEquals("State count wrong:", 2, flow.getStateCount());
assertTrue(flow.containsState("myState1"));
assertTrue(flow.containsState("myState2"));
State state = flow.getStateInstance("myState1");
assertEquals("Wrong flow:", flow.getId(), state.getFlow().getId());
assertEquals("Wrong state:", "myState1", flow.getState("myState1").getId());
assertEquals("Wrong state:", "myState2", flow.getState("myState2").getId());
}
内容来源于网络,如有侵权,请联系作者删除!