示例#1
0
 public override E set(int location, E obj)
 {
     if (modCount == fullList.modCount)
     {
         if (0 <= location && location < sizeJ)
         {
             return(fullList.set(location + offset, obj));
         }
         throw new java.lang.IndexOutOfBoundsException();
     }
     throw new ConcurrentModificationException();
 }
示例#2
0
        public void set(E obj)
        {
            if (expectedModCount != outInstance.modCount)
            {
                throw new ConcurrentModificationException();
            }

            try
            {
                outInstance.set(lastPosition, obj);
            }
            catch (java.lang.IndexOutOfBoundsException)
            {
                throw new java.lang.IllegalStateException();
            }
        }