Code example for Set

Methods: clear

0
    public boolean removeAll(Collection<?> c) {
        return getReference().removeAll(c);
    } 
 
    public void clear() { 
        getReference().clear();
    } 
 
    public Set<E> getReference() {
        Set<E> reference = this.reference ;
        if (reference != null) {
            return reference;
        } 
        return this.reference = makeReference();
    } 
 
    abstract Set<E> makeReference();
 
    public boolean isLazy() { 
        return reference == null;
    }