Code example for ConcurrentHashMap

Methods: isEmpty

0
	public synchronized int size() { 
	    return activeObjectMap.size();
	} 
 
	public synchronized boolean isEmpty() { 
	    return activeObjectMap.isEmpty();
	} 
 
	public Iterator<Object> iterator() {
	    return new ActiveObjectGroupIterator(); 
	} 
	 
	public class ActiveObjectGroupIterator implements Iterator<Object> {
	    private final Object[] collection;
	    private int index;
	     
	    public ActiveObjectGroupIterator() { 
	        collection = activeObjectMap.entrySet().toArray();
	        index = 0;
	    }