예제 #1
0
        public virtual object Clone()
        {
            IntegerList result = new IntegerList();

            result.list = (ArrayList)list.Clone();
            return(result);
        }
예제 #2
0
        public static IntegerList Synchronized(IntegerList list)
        {
            IntegerList result = new IntegerList();

            result.list = ArrayList.Synchronized(list.list);
            return(result);
        }
예제 #3
0
 public void InsertRange(int index, IntegerList other)
 {
     for (int i = 0; i < other.Count; i++)
     {
         list[index + i] = other[i];
     }
 }
예제 #4
0
        public IntegerList GetRange(int index, int count)
        {
            IntegerList result = new IntegerList();

            result.list = this.list.GetRange(index, count);
            return(result);
        }
예제 #5
0
        public static IntegerList Repeat(int value, int count)
        {
            IntegerList result = new IntegerList();

            for (int i = 0; i < count; i++)
            {
                result.Add(value);
            }
            return(result);
        }
예제 #6
0
        public override bool Equals(object obj)
        {
            if (!(obj is IntegerList))
            {
                return(false);
            }
            IntegerList otherList = (IntegerList)obj;

            if (otherList.Count != this.Count)
            {
                return(false);
            }
            for (int i = 0; i < this.list.Count; i++)
            {
                if (this[i] != otherList[i])
                {
                    return(false);
                }
            }
            return(true);
        }
예제 #7
0
 public void SetRange(int index, IntegerList otherList)
 {
     list.SetRange(index, otherList.list);
 }