Ejemplo n.º 1
0
 public override E get(int location)
 {
     if (modCount == fullList.modCount)
     {
         if (0 <= location && location < sizeJ)
         {
             return(fullList.get(location + offset));
         }
         throw new java.lang.IndexOutOfBoundsException();
     }
     throw new ConcurrentModificationException();
 }
Ejemplo n.º 2
0
        public E previous()
        {
            if (expectedModCount != outInstance.modCount)
            {
                throw new ConcurrentModificationException();
            }

            try
            {
                int index  = outInstance.size() - numLeft - 1;
                E   result = outInstance.get(index);
                numLeft++;
                lastPosition = index;
                return(result);
            }
            catch (java.lang.IndexOutOfBoundsException)
            {
                throw new NoSuchElementException();
            }
        }
Ejemplo n.º 3
0
        public virtual E next()
        {
            if (expectedModCount != outerInstance.modCount)
            {
                throw new ConcurrentModificationException();
            }

            try
            {
                int index  = outerInstance.size() - numLeft;
                E   result = outerInstance.get(index);
                lastPosition = index;
                numLeft--;
                return(result);
            }
            catch (java.lang.IndexOutOfBoundsException e)
            {
                throw new NoSuchElementException();
            }
        }