public boolean add(int value){
  int index=value % this.numBuckets;
  Bucket bucket=this.buckets[index];
  if (bucket == null) {
    bucket=this.buckets[index]=new Bucket(this.bucketInitialCapacity);
  }
 else {
    for (int i=0; i < bucket.length; i++) {
      if (bucket.values[i] == value)       return false;
    }
  }
  if (bucket.values.length <= bucket.length) {
    int[] tmp=new int[2 * bucket.values.length];
    System.arraycopy(bucket.values,0,tmp,0,bucket.values.length);
    bucket.values=tmp;
  }
  bucket.values[bucket.length++]=value;
  this.size++;
  return true;
}

public boolean add ( int value ) { int index = value % this . numBuckets ; Bucket bucket = this . buckets [ index ] ; if ( bucket == null ) { bucket = this . buckets [ index ] = new Bucket ( this . bucketInitialCapacity ) ; } else { for ( int i = 0 ; i < bucket . length ; i ++ ) { if ( bucket . values [ i ] == value ) return false ; } } if ( bucket . values . length <= bucket . length ) { int [ ] tmp = new int [ 2 * bucket . values . length ] ; System . arraycopy ( bucket . values , 0 , tmp , 0 , bucket . values . length ) ; bucket . values = tmp ; } bucket . values [ bucket . length ++ ] = value ; this . size ++ ; return true ; }
adds the specified value to this set . if this set does not contain the value , it is added to this set and this returns true . otherwise this does nothing and returns false .
