Code example for List

Methods: clear

0
        return _refs.size();
    } 
 
    /** Removes all object from the bag. */ 
    public void clear(){ 
        _refs.clear();
    } 
     
    /** Removes any null objects from the bag. */ 
    public void clean(){ 
        for ( Iterator<MyRef> i = _refs.iterator(); i.hasNext(); ){
            MyRef ref = i.next();
            if ( ref.get() == null )
                i.remove();
        } 
    } 
 
    public Iterator<T> iterator(){
        return getAll().iterator();
    }