/** * Appends all elements of the specified list to the receiver. * @param list the list of which all elements shall be appended. */ public void addAllOf(IntArrayList other) { addAllOfFromTo(other,0,other.size()-1); } /**
/** * Appends all elements of the specified list to the receiver. * @param list the list of which all elements shall be appended. */ public void addAllOf(IntArrayList other) { addAllOfFromTo(other,0,other.size()-1); } /**
/** * Appends all elements of the specified list to the receiver. * * @param other * the list of which all elements shall be appended. */ public void addAllOf(IntArrayList other) { addAllOfFromTo(other, 0, other.size() - 1); }
/** * Sets the receiver's elements to be the specified array. * The size and capacity of the list is the length of the array. * <b>WARNING:</b> For efficiency reasons and to keep memory usage low, this method may decide <b>not to copy the array</b>. * So if subsequently you modify the returned array directly via the [] operator, be sure you know what you're doing. * * @param elements the new elements to be stored. * @return the receiver itself. */ public AbstractIntList elements(int[] elements) { clear(); addAllOfFromTo(new IntArrayList(elements),0,elements.length-1); return this; } /**
/** * Sets the receiver's elements to be the specified array. The size and * capacity of the list is the length of the array. <b>WARNING:</b> For * efficiency reasons and to keep memory usage low, this method may decide * <b>not to copy the array</b>. So if subsequently you modify the returned * array directly via the [] operator, be sure you know what you're doing. * * @param elements * the new elements to be stored. * @return the receiver itself. */ public AbstractIntList elements(int[] elements) { clear(); addAllOfFromTo(new IntArrayList(elements), 0, elements.length - 1); return this; }
/** * Sets the receiver's elements to be the specified array. * The size and capacity of the list is the length of the array. * <b>WARNING:</b> For efficiency reasons and to keep memory usage low, this method may decide <b>not to copy the array</b>. * So if subsequently you modify the returned array directly via the [] operator, be sure you know what you're doing. * * @param elements the new elements to be stored. * @return the receiver itself. */ public AbstractIntList elements(int[] elements) { clear(); addAllOfFromTo(new IntArrayList(elements),0,elements.length-1); return this; } /**
/** * Returns a list which is a concatenation of <code>times</code> times the receiver. * @param times the number of times the receiver shall be copied. */ public AbstractIntList times(int times) { AbstractIntList newList = new IntArrayList(times*size()); for (int i=times; --i >= 0; ) { newList.addAllOfFromTo(this,0,size()-1); } return newList; } /**
/** * Returns a list which is a concatenation of <code>times</code> times the receiver. * @param times the number of times the receiver shall be copied. */ public AbstractIntList times(int times) { AbstractIntList newList = new IntArrayList(times*size()); for (int i=times; --i >= 0; ) { newList.addAllOfFromTo(this,0,size()-1); } return newList; } /**
/** * Returns a list which is a concatenation of <code>times</code> times the * receiver. * * @param times * the number of times the receiver shall be copied. */ public AbstractIntList times(int times) { AbstractIntList newList = new IntArrayList(times * size()); for (int i = times; --i >= 0;) { newList.addAllOfFromTo(this, 0, size() - 1); } return newList; }