Code example for Set

Methods: containsAll

0
    public boolean contains(Object obj) {
        return map.containsKey(obj);
    } 
 
    public boolean containsAll(Collection<?> coll) {
        return map.keySet().containsAll(coll);
    } 
 
    public boolean add(K obj) {
        int size = map.size();
        map.put(obj, dummyValue);
        return (map.size() != size);
    } 
 
    public boolean addAll(Collection<? extends K> coll) {
        int size = map.size();
        for (Iterator<? extends K> it = coll.iterator(); it.hasNext();) {
            K obj = it.next();
            map.put(obj, dummyValue);
        } 
        return (map.size() != size);