Java tutorial
//package com.java2s; import java.util.*; public class Main { /** * Remove the value from collection coll and return a new collection. */ public static <T> Set<T> remove(Collection<T> coll, T value) { Set<T> copy = new HashSet<T>(coll); copy.remove(value); return copy; } }