public StringSet clone(){
  StringSet result=new StringSet();
  for (int i=0; i < contents.size(); i++) {
    result.add(contents.elementAt(i));
  }
  return result;
}

public StringSet clone ( ) { StringSet result = new StringSet ( ) ; for ( int i = 0 ; i < contents . size ( ) ; i ++ ) { result . add ( contents . elementAt ( i ) ) ; } return result ; }
returns a shallow copy of the set , which for strings is equivalent to a deep copy .
