public AccessibleState[] toArray(){
  if (states == null) {
    return new AccessibleState[0];
  }
 else {
    AccessibleState[] stateArray=new AccessibleState[states.size()];
    for (int i=0; i < stateArray.length; i++) {
      stateArray[i]=(AccessibleState)states.elementAt(i);
    }
    return stateArray;
  }
}

public AccessibleState [ ] toArray ( ) { if ( states == null ) { return new AccessibleState [ 0 ] ; } else { AccessibleState [ ] stateArray = new AccessibleState [ states . size ( ) ] ; for ( int i = 0 ; i < stateArray . length ; i ++ ) { stateArray [ i ] = ( AccessibleState ) states . elementAt ( i ) ; } return stateArray ; } }
returns the current state set as an array of accessiblestate
