コード例 #1
0
 public override bool containsAll <_T0>(java.util.Collection <_T0> collection)
 {
     java.util.concurrent.CopyOnWriteArrayList.Slice slice = this.slice;
     object[] snapshot = this._enclosing.elements;
     slice.checkConcurrentModification(snapshot);
     return(java.util.concurrent.CopyOnWriteArrayList <E> .containsAll(collection, snapshot
                                                                       , slice.from, slice.to));
 }
コード例 #2
0
 public override E get(int index)
 {
     java.util.concurrent.CopyOnWriteArrayList.Slice slice = this.slice;
     object[] snapshot = this._enclosing.elements;
     slice.checkElementIndex(index);
     slice.checkConcurrentModification(snapshot);
     return((E)snapshot[index + slice.from]);
 }
コード例 #3
0
            public override int lastIndexOf(object @object)
            {
                java.util.concurrent.CopyOnWriteArrayList.Slice slice = this.slice;
                object[] snapshot = this._enclosing.elements;
                slice.checkConcurrentModification(snapshot);
                int result = java.util.concurrent.CopyOnWriteArrayList <E> .lastIndexOf(@object, snapshot
                                                                                        , slice.from, slice.to);

                return((result != -1) ? (result - slice.from) : -1);
            }
コード例 #4
0
 public override java.util.ListIterator <E> listIterator(int index)
 {
     java.util.concurrent.CopyOnWriteArrayList.Slice slice = this.slice;
     object[] snapshot = this._enclosing.elements;
     slice.checkPositionIndex(index);
     slice.checkConcurrentModification(snapshot);
     java.util.concurrent.CopyOnWriteArrayList.CowIterator <E> result = new java.util.concurrent.CopyOnWriteArrayList
                                                                        .CowIterator <E>(snapshot, slice.from, slice.to);
     result.index = slice.from + index;
     return(result);
 }