Code example for ConcurrentModificationException

0
            // END android-changed 
        } 
 
        void checkConcurrentMod() throws ConcurrentModificationException { 
            if (expectedModCount != associatedMap.modCount) {
                throw new ConcurrentModificationException();
            } 
        } 
 
        public E next() { 
            // BEGIN android-changed 
            // inline checkConcurrentMod() 
            if (expectedModCount != associatedMap.modCount) {
                throw new ConcurrentModificationException();
            } 
            if (!hasNext()) { 
                throw new NoSuchElementException();
            } 
 
            Entry<VT> result;