コード例 #1
0
 public SortedRangeList(int capacity)
 {
     if (capacity > 0)
     {
         _list = new GapBuffer <T>(capacity);
     }
     else
     {
         _list = s_emptyList;
     }
 }
コード例 #2
0
        public void Insert(int index, T item)
        {
            if (item == null)
            {
                Debug.Fail("Can't insert a null item");
            }
            else
            {
                if (_list == s_emptyList)
                {
                    _list = new GapBuffer <T>();
                }

                _list.Insert(index, item);
                ChangeStamp++;

                OnAdded(index);
                VerifyInsertedObject(index);
            }
        }