@Override public Vector whatCanGoHere(int[] state){
  int curState=state[0];
  if (curState < 0)   curState=state[1];
  Occurence o=(fCountingStates != null) ? fCountingStates[curState] : null;
  int count=state[2];
  Vector ret=new Vector();
  for (int elemIndex=0; elemIndex < fElemMapSize; elemIndex++) {
    int nextState=fTransTable[curState][elemIndex];
    if (nextState != -1) {
      if (o != null) {
        if (curState == nextState) {
          if (count >= o.maxOccurs && o.maxOccurs != SchemaSymbols.OCCURRENCE_UNBOUNDED) {
            continue;
          }
        }
 else         if (count < o.minOccurs) {
          continue;
        }
      }
      ret.addElement(fElemMap[elemIndex]);
    }
  }
  return ret;
}

@ Override public Vector whatCanGoHere ( int [ ] state ) { int curState = state [ 0 ] ; if ( curState < 0 ) curState = state [ 1 ] ; Occurence o = ( fCountingStates != null ) ? fCountingStates [ curState ] : null ; int count = state [ 2 ] ; Vector ret = new Vector ( ) ; for ( int elemIndex = 0 ; elemIndex < fElemMapSize ; elemIndex ++ ) { int nextState = fTransTable [ curState ] [ elemIndex ] ; if ( nextState != - 1 ) { if ( o != null ) { if ( curState == nextState ) { if ( count >= o . maxOccurs && o . maxOccurs != SchemaSymbols . OCCURRENCE_UNBOUNDED ) { continue ; } } else if ( count < o . minOccurs ) { continue ; } } ret . addElement ( fElemMap [ elemIndex ] ) ; } } return ret ; }
check which elements are valid to appear at this point . this method also works if the state is in error , in which case it returns what should have been seen .
