/// <summary> /// Returns a list which is a concatenation of <code>times</code> times the receiver. /// <summary> /// <param name="times">the number of times the receiver shall be copied.</param> public virtual AbstractBooleanList Times(int times) { AbstractBooleanList newList = new BooleanArrayList(times * _size); for (int i = times; --i >= 0;) { newList.AddAllOfFromTo(this, 0, _size - 1); } return(newList); }
/// <summary> /// Returns a new list of the part of the receiver between <code>from</code>, inclusive, and <code>to</code>, inclusive. /// <summary> /// <param name="from">the index of the first element (inclusive).</param> /// <param name="to">the index of the last element (inclusive).</param> /// <returns>a new list</returns> /// <exception cref="IndexOutOfRangeException">index is out of range (<i>_size>0 && (from<0 || from>to || to>=_size)</i>). </exception> public virtual AbstractBooleanList PartFromTo(int from, int to) { CheckRangeFromTo(from, to, _size); int Length = to - from + 1; BooleanArrayList part = new BooleanArrayList(Length); part.AddAllOfFromTo(this, from, to); return(part); }