while (low <= high) { int mid =(low + high)/2; long midVal = get(mid);
while (low <= high) { int mid =(low + high)/2; long midVal = get(mid);
while (low <= high) { int mid = (low + high) / 2; long midVal = get(mid);
/** * Returns a <code>java.util.ArrayList</code> containing all the elements in the receiver. */ public java.util.ArrayList toList() { int mySize = size(); java.util.ArrayList list = new java.util.ArrayList(mySize); for (int i=0; i < mySize; i++) list.add(new Long(get(i))); return list; } /**
/** * Applies a procedure to each element of the receiver, if any. * Starts at index 0, moving rightwards. * @param procedure the procedure to be applied. Stops iteration if the procedure returns <tt>false</tt>, otherwise continues. * @return <tt>false</tt> if the procedure stopped before all elements where iterated over, <tt>true</tt> otherwise. */ public boolean forEach(LongProcedure procedure) { for (int i=0; i<size;) if (! procedure.apply(get(i++))) return false; return true; } /**
/** * Applies a procedure to each element of the receiver, if any. * Starts at index 0, moving rightwards. * @param procedure the procedure to be applied. Stops iteration if the procedure returns <tt>false</tt>, otherwise continues. * @return <tt>false</tt> if the procedure stopped before all elements where iterated over, <tt>true</tt> otherwise. */ public boolean forEach(LongProcedure procedure) { for (int i=0; i<size;) if (! procedure.apply(get(i++))) return false; return true; } /**
/** * Returns a <code>java.util.ArrayList</code> containing all the elements in * the receiver. */ public java.util.ArrayList toList() { int mySize = size(); java.util.ArrayList list = new java.util.ArrayList(mySize); for (int i = 0; i < mySize; i++) list.add(new Long(get(i))); return list; }
/** * Returns the element at the specified position in this list. * * @param index index of element to return. * * @return the element at the specified position in this list. * @throws IndexOutOfBoundsException if the given index is out of range * (<tt>index < 0 || index >= size()</tt>). */ public Object get(int index) { return object(content.get(index)); } /**
/** * Returns a <code>java.util.ArrayList</code> containing all the elements in the receiver. */ public java.util.ArrayList toList() { int mySize = size(); java.util.ArrayList list = new java.util.ArrayList(mySize); for (int i=0; i < mySize; i++) list.add(new Long(get(i))); return list; } /**
/** * Returns the element at the specified position in this list. * * @param index index of element to return. * * @return the element at the specified position in this list. * @throws IndexOutOfBoundsException if the given index is out of range * (<tt>index < 0 || index >= size()</tt>). */ public Object get(int index) { return object(content.get(index)); } /**
/** * Applies a procedure to each element of the receiver, if any. Starts at * index 0, moving rightwards. * * @param procedure * the procedure to be applied. Stops iteration if the procedure * returns <tt>false</tt>, otherwise continues. * @return <tt>false</tt> if the procedure stopped before all elements where * iterated over, <tt>true</tt> otherwise. */ public boolean forEach(LongProcedure procedure) { for (int i = 0; i < size;) if (!procedure.apply(get(i++))) return false; return true; }