Code example for TreeSet

Methods: removeAll

0
				tmp.add(x);
		return tmp;
	} 
 
	public <T> Set<T> difference(Set<T> setA, Set<T> setB) {
		Set<T> tmp = new TreeSet<T>(setA);
		tmp.removeAll(setB);
		return tmp;
	} 
 
	public <T> Set<T> symDifference(Set<T> setA, Set<T> setB) {
		Set<T> tmpA;
		Set<T> tmpB;
 
		tmpA = union(setA, setB);
		tmpB = intersection(setA, setB);
		return difference(tmpA, tmpB);
	} 
 
	public <T> boolean isSubset(Set<T> setA, Set<T> setB) {
		return setB.containsAll(setA);