/** Returns the index where to look for the value in the enclosing vector. */ final int toBacking(final int index) { ensureValidIndex(length, index); return index*step + first; }
/** * {@inheritDoc} */ @Override // Must also be overridden in SubEnvelope public double getUpper(final int dimension) throws IndexOutOfBoundsException { final int d = ordinates.length >>> 1; ensureValidIndex(d, dimension); return ordinates[dimension + d]; }
/** * Returns the node at the specified index in this list. * * @param index the index of the node to fetch. * @return the node at the given index (never {@code null}). */ @Override public TreeTable.Node get(final int index) { ArgumentChecks.ensureValidIndex(size, index); return children[index]; }
/** * Must be overridden, since the super-class method does not handle the index range * for performance reasons. */ @Override public double getLower(final int dimension) throws IndexOutOfBoundsException { ensureValidIndex(endIndex, dimension); return ordinates[dimension + beginIndex]; }
/** * Must be overridden, since the super-class method does not handle the index range * for performance reasons. */ @Override public double getUpper(final int dimension) throws IndexOutOfBoundsException { ensureValidIndex(endIndex, dimension); return ordinates[dimension + beginIndex + (ordinates.length >>> 1)]; }
/** * {@inheritDoc} */ @Override // Must also be overridden in SubEnvelope public double getLower(final int dimension) throws IndexOutOfBoundsException { ensureValidIndex(ordinates.length >>> 1, dimension); return ordinates[dimension]; }
/** * Must be overridden, since the super-class method does not handle the index range * for performance reasons. */ @Override public double getLower(final int dimension) throws IndexOutOfBoundsException { ensureValidIndex(endIndex, dimension); return ordinates[dimension + beginIndex]; }
/** * Must be overridden, since the super-class method does not handle the index range * for performance reasons. */ @Override public double getUpper(final int dimension) throws IndexOutOfBoundsException { ensureValidIndex(endIndex, dimension); return ordinates[dimension + beginIndex + (ordinates.length >>> 1)]; }
/** Computes the value at the given index. */ @Override public double doubleValue(final int index) { ArgumentChecks.ensureValidIndex(length, index); return first + increment*index; }
/** Computes the value at the given index. */ @Override public long longValue(final int index) { ArgumentChecks.ensureValidIndex(length, index); return first + increment*index; }
/** * {@inheritDoc} */ @Override // Must also be overridden in SubEnvelope public double getUpper(final int dimension) throws IndexOutOfBoundsException { final int d = ordinates.length >>> 1; ensureValidIndex(d, dimension); return ordinates[dimension + d]; }
/** Computes the value at the given index. */ @Override public long longValue(final int index) { ArgumentChecks.ensureValidIndex(length, index); return first + increment*index; }
/** * Returns the node at the specified index in this list. * * @param index the index of the node to fetch. * @return the node at the given index (never {@code null}). */ @Override public TreeTable.Node get(final int index) { ArgumentChecks.ensureValidIndex(size, index); return children[index]; }
/** Computes the value at the given index. */ @Override public final double doubleValue(final int index) { ArgumentChecks.ensureValidIndex(length, index); return first + increment*index; // TODO: use Math.fma with JDK9. }
/** * Returns the element at the given index. */ @Override public E get(final int index) { ArgumentChecks.ensureValidIndex(size, index); return super.get(index + lower); }
/** * Returns the exception which was the cause of the message at the given index, or {@code null} if none. * * @param index the value given to {@link #getMessage(int)}. * @return the exception which was the cause of the warning message, or {@code null} if none. */ public Exception getException(final int index) { ArgumentChecks.ensureValidIndex(getNumMessages(), index); return (Exception) messages.get(index*2 + 1); }
/** * Returns the element at the given index as the {@code int} primitive type. * * @param index the element index. * @return the value at the given index. * @throws IndexOutOfBoundsException if the given index is out of bounds. */ public int getInt(final int index) throws IndexOutOfBoundsException { ArgumentChecks.ensureValidIndex(size, index); return getUnchecked(index); }
/** * Returns the element at the given index. */ @Override public E get(final int index) { ArgumentChecks.ensureValidIndex(size, index); return super.get(index + lower); }
/** * Returns the exception which was the cause of the message at the given index, or {@code null} if none. * * @param index the value given to {@link #getMessage(int)}. * @return the exception which was the cause of the warning message, or {@code null} if none. */ public Exception getException(final int index) { ArgumentChecks.ensureValidIndex(getNumMessages(), index); return (Exception) messages.get(index*2 + 1); }
/** * Returns the element at the given index as the {@code int} primitive type. * * @param index the element index. * @return the value at the given index. * @throws IndexOutOfBoundsException if the given index is out of bounds. */ public int getInt(final int index) throws IndexOutOfBoundsException { ArgumentChecks.ensureValidIndex(size, index); return getUnchecked(index); }