/** * Returns a new list of the part of the receiver between <code>from</code>, inclusive, and <code>to</code>, inclusive. * @param from the index of the first element (inclusive). * @param to the index of the last element (inclusive). * @return a new list * @exception IndexOutOfBoundsException index is out of range (<tt>size()>0 && (from<0 || from>to || to>=size())</tt>). */ public AbstractByteList partFromTo(int from, int to) { if (size==0) return new ByteArrayList(0); checkRangeFromTo(from, to, size); byte[] part = new byte[to-from+1]; System.arraycopy(elements, from, part, 0, to-from+1); return new ByteArrayList(part); } /**
/** * Returns a new list of the part of the receiver between <code>from</code>, inclusive, and <code>to</code>, inclusive. * @param from the index of the first element (inclusive). * @param to the index of the last element (inclusive). * @return a new list * @exception IndexOutOfBoundsException index is out of range (<tt>size()>0 && (from<0 || from>to || to>=size())</tt>). */ public AbstractByteList partFromTo(int from, int to) { if (size==0) return new ByteArrayList(0); checkRangeFromTo(from, to, size); byte[] part = new byte[to-from+1]; System.arraycopy(elements, from, part, 0, to-from+1); return new ByteArrayList(part); } /**
/** * Returns a deep copy of the receiver. * * @return a deep copy of the receiver. */ public Object clone() { // overridden for performance only. ByteArrayList clone = new ByteArrayList((byte[]) elements.clone()); clone.setSizeRaw(size); return clone; } /**
/** * Returns a deep copy of the receiver. * * @return a deep copy of the receiver. */ public Object clone() { // overridden for performance only. ByteArrayList clone = new ByteArrayList((byte[]) elements.clone()); clone.setSizeRaw(size); return clone; } /**
/** * Removes all (key,value) associations from the receiver. * Implicitly calls <tt>trimToSize()</tt>. */ public void clear() { new ByteArrayList(this.state).fillFromToWith(0, this.state.length-1, FREE); //new IntArrayList(values).fillFromToWith(0, state.length-1, 0); // delta this.distinct = 0; this.freeEntries = table.length; // delta trimToSize(); } /**
/** * Removes all (key,value) associations from the receiver. * Implicitly calls <tt>trimToSize()</tt>. */ public void clear() { new ByteArrayList(this.state).fillFromToWith(0, this.state.length-1, FREE); //new DoubleArrayList(values).fillFromToWith(0, state.length-1, 0); // delta this.distinct = 0; this.freeEntries = table.length; // delta trimToSize(); } /**
/** * Removes all (key,value) associations from the receiver. * Implicitly calls <tt>trimToSize()</tt>. */ public void clear() { new ByteArrayList(this.state).fillFromToWith(0, this.state.length-1, FREE); //new IntArrayList(values).fillFromToWith(0, state.length-1, 0); // delta this.distinct = 0; this.freeEntries = table.length; // delta trimToSize(); } /**
/** * Returns a deep copy of the receiver. * * @return a deep copy of the receiver. */ public Object clone() { // overridden for performance only. ByteArrayList clone = new ByteArrayList((byte[]) elements.clone()); clone.setSizeRaw(size); return clone; }
/** * Removes all (key,value) associations from the receiver. * Implicitly calls <tt>trimToSize()</tt>. */ public void clear() { new ByteArrayList(this.state).fillFromToWith(0, this.state.length-1, FREE); //new DoubleArrayList(values).fillFromToWith(0, state.length-1, 0); // delta this.distinct = 0; this.freeEntries = table.length; // delta trimToSize(); } /**
/** * Removes all (key,value) associations from the receiver. Implicitly calls * <tt>trimToSize()</tt>. */ public void clear() { new ByteArrayList(this.state).fillFromToWith(0, this.state.length - 1, FREE); // new DoubleArrayList(values).fillFromToWith(0, state.length-1, 0); // // delta this.distinct = 0; this.freeEntries = table.length; // delta trimToSize(); }
/** * Removes all (key,value) associations from the receiver. Implicitly calls * <tt>trimToSize()</tt>. */ public void clear() { new ByteArrayList(this.state).fillFromToWith(0, this.state.length - 1, FREE); // new IntArrayList(values).fillFromToWith(0, state.length-1, 0); // // delta this.distinct = 0; this.freeEntries = table.length; // delta trimToSize(); }
/** * 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 AbstractByteList times(int times) { AbstractByteList newList = new ByteArrayList(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 AbstractByteList times(int times) { AbstractByteList newList = new ByteArrayList(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 AbstractByteList times(int times) { AbstractByteList newList = new ByteArrayList(times * size()); for (int i = times; --i >= 0;) { newList.addAllOfFromTo(this, 0, size() - 1); } return newList; }
/** * Removes all (key,value) associations from the receiver. * Implicitly calls <tt>trimToSize()</tt>. */ public void clear() { new ByteArrayList(this.state).fillFromToWith(0, this.state.length-1, FREE); new ObjectArrayList(values).fillFromToWith(0, state.length-1, null); // delta this.distinct = 0; this.freeEntries = table.length; // delta trimToSize(); } /**
/** * Removes all (key,value) associations from the receiver. Implicitly calls * <tt>trimToSize()</tt>. */ public void clear() { new ByteArrayList(this.state).fillFromToWith(0, this.state.length - 1, FREE); new ObjectArrayList(values).fillFromToWith(0, state.length - 1, null); // delta this.distinct = 0; this.freeEntries = table.length; // delta trimToSize(); }
/** * Removes all (key,value) associations from the receiver. * Implicitly calls <tt>trimToSize()</tt>. */ public void clear() { new ByteArrayList(this.state).fillFromToWith(0, this.state.length-1, FREE); new ObjectArrayList(values).fillFromToWith(0, state.length-1, null); // delta this.distinct = 0; this.freeEntries = table.length; // delta trimToSize(); } /**
/** * Removes all (key,value) associations from the receiver. * Implicitly calls <tt>trimToSize()</tt>. */ public void clear() { new ByteArrayList(this.state).fillFromToWith(0, this.state.length-1, FREE); new ObjectArrayList(values).fillFromToWith(0, state.length-1, null); // delta this.distinct = 0; this.freeEntries = table.length; // delta trimToSize(); } /**
/** * Removes all (key,value) associations from the receiver. * Implicitly calls <tt>trimToSize()</tt>. */ public void clear() { new ByteArrayList(this.state).fillFromToWith(0, this.state.length-1, FREE); new ObjectArrayList(values).fillFromToWith(0, state.length-1, null); // delta this.distinct = 0; this.freeEntries = table.length; // delta trimToSize(); } /**
/** * Removes all (key,value) associations from the receiver. Implicitly calls <tt>trimToSize()</tt>. */ public void clear() { new ByteArrayList(this.state).fillFromToWith(0, this.state.length - 1, FREE); new ObjectArrayList(values).fillFromToWith(0, state.length - 1, null); // delta this.distinct = 0; this.freeEntries = table.length; // delta trimToSize(); }