public boolean add(AccessibleState state){
  if (states == null) {
    states=new Vector();
  }
  if (!states.contains(state)) {
    states.addElement(state);
    return true;
  }
 else {
    return false;
  }
}

public boolean add ( AccessibleState state ) { if ( states == null ) { states = new Vector ( ) ; } if ( ! states . contains ( state ) ) { states . addElement ( state ) ; return true ; } else { return false ; } }
adds a new state to the current state set if it is not already present . if the state is already in the state set , the state set is unchanged and the return value is false . otherwise , the state is added to the state set and the return value is true .
