Code example for Set

Methods: remove

0
    ) throws ServiceException 
    { 
      moved = true;
      if(isObjectInBucket(sourceBucketName, sourceObjectKey)) {
        this.putObject(destinationBucketName, new S3Object(destinationObject.getKey()));
        storage.get(sourceBucketName).remove(sourceObjectKey);
      } 
      return null; 
    } 
 
    @Override 
    public S3Object putObject(String bucketName, S3Object object) throws S3ServiceException
    { 
      if (!storage.containsKey(bucketName)) {
        storage.put(bucketName, Sets.<String>newHashSet());
      } 
      storage.get(bucketName).add(object.getKey());
      return object;
    } 
  } 
}