/** * Gets the current value at position {@code i}. * * @param i the index * @return the current value */ public final E get(int i) { return getRaw(checkedByteOffset(i)); }
/** * Returns the String representation of the current values of array. * @return the String representation of the current values of array */ public String toString() { int iMax = array.length - 1; if (iMax == -1) return "[]"; StringBuilder b = new StringBuilder(); b.append('['); for (int i = 0; ; i++) { b.append(getRaw(byteOffset(i))); if (i == iMax) return b.append(']').toString(); b.append(',').append(' '); } }
/** * Atomically sets the element at position {@code i} to the given * value and returns the old value. * * @param i the index * @param newValue the new value * @return the previous value */ public final E getAndSet(int i, E newValue) { long offset = checkedByteOffset(i); while (true) { E current = getRaw(offset); if (compareAndSetRaw(offset, current, newValue)) return current; } }
/** * Gets the current value at position {@code i}. * * @param i the index * @return the current value */ public final E get(int i) { return getRaw(checkedByteOffset(i)); }
/** * Gets the current value at position {@code i}. * * @param i the index * @return the current value */ public final E get(int i) { return getRaw(checkedByteOffset(i)); }
/** * Gets the current value at position {@code i}. * * @param i the index * @return the current value */ public final E get(int i) { return getRaw(checkedByteOffset(i)); }
/** * Gets the current value at position {@code i}. * * @param i the index * @return the current value */ public final E get(int i) { return getRaw(checkedByteOffset(i)); }
/** * Gets the current value at position {@code i}. * * @param i the index * @return the current value */ public final E get(int i) { return getRaw(checkedByteOffset(i)); }
/** * Gets the current value at position {@code i}. * * @param i the index * @return the current value */ public final E get(int i) { return getRaw(checkedByteOffset(i)); }
/** * Gets the current value at position {@code i}. * * @param i the index * @return the current value */ public final E get(int i) { return getRaw(checkedByteOffset(i)); }
/** * Gets the current value at position {@code i}. * * @param i the index * @return the current value */ public final E get(int i) { return getRaw(checkedByteOffset(i)); }
/** * Returns the String representation of the current values of array. * @return the String representation of the current values of array */ public String toString() { int iMax = array.length - 1; if (iMax == -1) return "[]"; StringBuilder b = new StringBuilder(); b.append('['); for (int i = 0; ; i++) { b.append(getRaw(byteOffset(i))); if (i == iMax) return b.append(']').toString(); b.append(',').append(' '); } }
/** * Returns the String representation of the current values of array. * @return the String representation of the current values of array */ public String toString() { int iMax = array.length - 1; if (iMax == -1) return "[]"; StringBuilder b = new StringBuilder(); b.append('['); for (int i = 0; ; i++) { b.append(getRaw(byteOffset(i))); if (i == iMax) return b.append(']').toString(); b.append(',').append(' '); } }
/** * Returns the String representation of the current values of array. * @return the String representation of the current values of array */ public String toString() { int iMax = array.length - 1; if (iMax == -1) return "[]"; StringBuilder b = new StringBuilder(); b.append('['); for (int i = 0; ; i++) { b.append(getRaw(byteOffset(i))); if (i == iMax) return b.append(']').toString(); b.append(',').append(' '); } }
/** * Atomically sets the element at position {@code i} to the given * value and returns the old value. * * @param i the index * @param newValue the new value * @return the previous value */ public final E getAndSet(int i, E newValue) { long offset = checkedByteOffset(i); while (true) { E current = getRaw(offset); if (compareAndSetRaw(offset, current, newValue)) return current; } }
/** * Atomically sets the element at position {@code i} to the given * value and returns the old value. * * @param i the index * @param newValue the new value * @return the previous value */ public final E getAndSet(int i, E newValue) { long offset = checkedByteOffset(i); while (true) { E current = getRaw(offset); if (compareAndSetRaw(offset, current, newValue)) return current; } }
/** * Atomically sets the element at position {@code i} to the given * value and returns the old value. * * @param i the index * @param newValue the new value * @return the previous value */ public final E getAndSet(int i, E newValue) { long offset = checkedByteOffset(i); while (true) { E current = (E) getRaw(offset); if (compareAndSetRaw(offset, current, newValue)) return current; } }
/** * Atomically sets the element at position {@code i} to the given * value and returns the old value. * * @param i the index * @param newValue the new value * @return the previous value */ public final E getAndSet(int i, E newValue) { long offset = checkedByteOffset(i); while (true) { E current = getRaw(offset); if (compareAndSetRaw(offset, current, newValue)) return current; } }
/** * Atomically sets the element at position {@code i} to the given * value and returns the old value. * * @param i the index * @param newValue the new value * @return the previous value */ public final E getAndSet(int i, E newValue) { long offset = checkedByteOffset(i); while (true) { E current = getRaw(offset); if (compareAndSetRaw(offset, current, newValue)) return current; } }
/** * Atomically sets the element at position {@code i} to the given * value and returns the old value. * * @param i the index * @param newValue the new value * @return the previous value */ public final E getAndSet(int i, E newValue) { long offset = checkedByteOffset(i); while (true) { E current = getRaw(offset); if (compareAndSetRaw(offset, current, newValue)) return current; } }