コード例 #1
0
ファイル: AbstractList.cs プロジェクト: ranganathsb/JavaSharp
        public virtual E Remove(int index)
        {
            RangeCheck(index);
            CheckForComodification();
            E result = l.Remove(index + Offset);

            this.ModCount = l.ModCount;
            Size_Renamed--;
            return(result);
        }
コード例 #2
0
        public void Remove()
        {
            int before = n - 1;

            if (before < 0)
            {
                throw new IllegalStateException();
            }
            list.Remove(before);
            n = before;
        }
コード例 #3
0
ファイル: AbstractList.cs プロジェクト: ranganathsb/JavaSharp
            public virtual void Remove()
            {
                if (LastRet < 0)
                {
                    throw new IllegalStateException();
                }
                CheckForComodification();

                try
                {
                    OuterInstance.Remove(LastRet);
                    if (LastRet < Cursor)
                    {
                        Cursor--;
                    }
                    LastRet          = -1;
                    ExpectedModCount = outerInstance.ModCount;
                }
                catch (IndexOutOfBoundsException)
                {
                    throw new ConcurrentModificationException();
                }
            }