Code example for Collection

Methods: clear

0
        } 
        return ret;
    } 
 
    public void clear() { 
        collection.clear();
    } 
 
    public boolean contains(Object object) {
        if (object  == null) {
            return false; 
        } 
        for (T compare : this) {
            if (object.equals(compare)) {
                return true; 
            } 
        } 
        return false; 
    } 
 
    public boolean containsAll(Collection<?> collection) {