String boardRule = null;
String alightRule = null;
for (int j = 1; j < legsStates[i].length; j++) {
if (legsStates[i][j].getBackEdge() instanceof PatternEdge) {
PatternEdge patternEdge = (PatternEdge) legsStates[i][j].getBackEdge();
TripPattern tripPattern = patternEdge.getPattern();
Integer fromIndex = legs.get(i).from.stopIndex;
Integer toIndex = legs.get(i).to.stopIndex;
int boardType = (fromIndex != null) ? (tripPattern.getBoardType(fromIndex)) : 0;