public void clear(){
  if (states != null) {
    states.removeAllElements();
  }
}

public void clear ( ) { if ( states != null ) { states . removeAllElements ( ) ; } }
removes all the states from the current state set .
