Code example for CopyOnWriteArrayList

Methods: size

0
            __listeners.remove(listener);
    } 
 
    public int getListenerCount() 
    { 
        return __listeners.size();
    } 
 
    /** 
     * Return an {@link Iterator} for the {@link EventListener} instances. 
     * 
     * @return an {@link Iterator} for the {@link EventListener} instances 
     * @since 2.0 
     * TODO Check that this is a good defensive strategy 
     */ 
    public Iterator<EventListener> iterator() {
            return __listeners.iterator();
    } 
 
}