/** * Gets the indicated element. It is an error to call this with the * index for an element which was never set; if you do that, this * will throw {@code NullPointerException}. This method is * protected so that subclasses may offer a safe type-checked * public interface to their clients. * * @param n {@code >= 0, < size();} which element * @return {@code non-null;} the indicated element */ protected final Object get0(int n) { try { Object result = arr[n]; if (result == null) { throw new NullPointerException("unset: " + n); } return result; } catch (ArrayIndexOutOfBoundsException ex) { // Translate the exception. return throwIndex(n); } }
/** * Gets the indicated element. It is an error to call this with the * index for an element which was never set; if you do that, this * will throw {@code NullPointerException}. This method is * protected so that subclasses may offer a safe type-checked * public interface to their clients. * * @param n {@code >= 0, < size();} which element * @return {@code non-null;} the indicated element */ protected final Object get0(int n) { try { Object result = arr[n]; if (result == null) { throw new NullPointerException("unset: " + n); } return result; } catch (ArrayIndexOutOfBoundsException ex) { // Translate the exception. return throwIndex(n); } }
/** * Gets the indicated element. It is an error to call this with the * index for an element which was never set; if you do that, this * will throw {@code NullPointerException}. This method is * protected so that subclasses may offer a safe type-checked * public interface to their clients. * * @param n {@code >= 0, < size();} which element * @return {@code non-null;} the indicated element */ protected final Object get0(int n) { try { Object result = arr[n]; if (result == null) { throw new NullPointerException("unset: " + n); } return result; } catch (ArrayIndexOutOfBoundsException ex) { // Translate the exception. return throwIndex(n); } }
/** * Gets the indicated element. It is an error to call this with the * index for an element which was never set; if you do that, this * will throw {@code NullPointerException}. This method is * protected so that subclasses may offer a safe type-checked * public interface to their clients. * * @param n {@code >= 0, < size();} which element * @return {@code non-null;} the indicated element */ protected final Object get0(int n) { try { Object result = arr[n]; if (result == null) { throw new NullPointerException("unset: " + n); } return result; } catch (ArrayIndexOutOfBoundsException ex) { // Translate the exception. return throwIndex(n); } }
/** * Gets the indicated element. It is an error to call this with the * index for an element which was never set; if you do that, this * will throw {@code NullPointerException}. This method is * protected so that subclasses may offer a safe type-checked * public interface to their clients. * * @param n {@code >= 0, < size();} which element * @return {@code non-null;} the indicated element */ protected final Object get0(int n) { try { Object result = arr[n]; if (result == null) { throw new NullPointerException("unset: " + n); } return result; } catch (ArrayIndexOutOfBoundsException ex) { // Translate the exception. return throwIndex(n); } }
/** * Gets the indicated element. It is an error to call this with the * index for an element which was never set; if you do that, this * will throw {@code NullPointerException}. This method is * protected so that subclasses may offer a safe type-checked * public interface to their clients. * * @param n {@code >= 0, < size();} which element * @return {@code non-null;} the indicated element */ protected final Object get0(int n) { try { Object result = arr[n]; if (result == null) { throw new NullPointerException("unset: " + n); } return result; } catch (ArrayIndexOutOfBoundsException ex) { // Translate the exception. return throwIndex(n); } }
/** * Gets the indicated element. It is an error to call this with the * index for an element which was never set; if you do that, this * will throw {@code NullPointerException}. This method is * protected so that subclasses may offer a safe type-checked * public interface to their clients. * * @param n {@code >= 0, < size();} which element * @return {@code non-null;} the indicated element */ protected final Object get0(int n) { try { Object result = arr[n]; if (result == null) { throw new NullPointerException("unset: " + n); } return result; } catch (ArrayIndexOutOfBoundsException ex) { // Translate the exception. return throwIndex(n); } }
/** * Gets the indicated element. It is an error to call this with the * index for an element which was never set; if you do that, this * will throw {@code NullPointerException}. This method is * protected so that subclasses may offer a safe type-checked * public interface to their clients. * * @param n {@code >= 0, < size();} which element * @return {@code non-null;} the indicated element */ protected final Object get0(int n) { try { Object result = arr[n]; if (result == null) { throw new NullPointerException("unset: " + n); } return result; } catch (ArrayIndexOutOfBoundsException ex) { // Translate the exception. return throwIndex(n); } }
/** * Sets the element at the given index, but without doing any type * checks on the element. This method is protected so that * subclasses may offer a safe type-checked public interface to * their clients. * * @param n {@code >= 0, < size();} which element * @param obj {@code null-ok;} the value to store */ protected final void set0(int n, Object obj) { throwIfImmutable(); try { arr[n] = obj; } catch (ArrayIndexOutOfBoundsException ex) { // Translate the exception. throwIndex(n); } }
/** * Sets the element at the given index, but without doing any type * checks on the element. This method is protected so that * subclasses may offer a safe type-checked public interface to * their clients. * * @param n {@code >= 0, < size();} which element * @param obj {@code null-ok;} the value to store */ protected final void set0(int n, Object obj) { throwIfImmutable(); try { arr[n] = obj; } catch (ArrayIndexOutOfBoundsException ex) { // Translate the exception. throwIndex(n); } }
/** * Sets the element at the given index, but without doing any type * checks on the element. This method is protected so that * subclasses may offer a safe type-checked public interface to * their clients. * * @param n {@code >= 0, < size();} which element * @param obj {@code null-ok;} the value to store */ protected final void set0(int n, Object obj) { throwIfImmutable(); try { arr[n] = obj; } catch (ArrayIndexOutOfBoundsException ex) { // Translate the exception. throwIndex(n); } }
/** * Sets the element at the given index, but without doing any type * checks on the element. This method is protected so that * subclasses may offer a safe type-checked public interface to * their clients. * * @param n {@code >= 0, < size();} which element * @param obj {@code null-ok;} the value to store */ protected final void set0(int n, Object obj) { throwIfImmutable(); try { arr[n] = obj; } catch (ArrayIndexOutOfBoundsException ex) { // Translate the exception. throwIndex(n); } }
/** * Sets the element at the given index, but without doing any type * checks on the element. This method is protected so that * subclasses may offer a safe type-checked public interface to * their clients. * * @param n {@code >= 0, < size();} which element * @param obj {@code null-ok;} the value to store */ protected final void set0(int n, Object obj) { throwIfImmutable(); try { arr[n] = obj; } catch (ArrayIndexOutOfBoundsException ex) { // Translate the exception. throwIndex(n); } }
/** * Sets the element at the given index, but without doing any type * checks on the element. This method is protected so that * subclasses may offer a safe type-checked public interface to * their clients. * * @param n {@code >= 0, < size();} which element * @param obj {@code null-ok;} the value to store */ protected final void set0(int n, Object obj) { throwIfImmutable(); try { arr[n] = obj; } catch (ArrayIndexOutOfBoundsException ex) { // Translate the exception. throwIndex(n); } }
/** * Sets the element at the given index, but without doing any type * checks on the element. This method is protected so that * subclasses may offer a safe type-checked public interface to * their clients. * * @param n {@code >= 0, < size();} which element * @param obj {@code null-ok;} the value to store */ protected final void set0(int n, Object obj) { throwIfImmutable(); try { arr[n] = obj; } catch (ArrayIndexOutOfBoundsException ex) { // Translate the exception. throwIndex(n); } }
/** * Sets the element at the given index, but without doing any type * checks on the element. This method is protected so that * subclasses may offer a safe type-checked public interface to * their clients. * * @param n {@code >= 0, < size();} which element * @param obj {@code null-ok;} the value to store */ protected final void set0(int n, Object obj) { throwIfImmutable(); try { arr[n] = obj; } catch (ArrayIndexOutOfBoundsException ex) { // Translate the exception. throwIndex(n); } }