/** * Sets the element at the given index. * * @param n {@code >= 0, < size();} which element * @param spec {@code non-null;} the value to store */ public void set(int n, RegisterSpec spec) { set0(n, spec); }
/** * Sets the element at the given index. * * @param n {@code >= 0, < size();} which element * @param spec {@code non-null;} the value to store */ public void set(int n, RegisterSpec spec) { set0(n, spec); }
/** * Sets the element at the given index. * * @param n {@code >= 0, < size();} which element * @param spec {@code non-null;} the value to store */ public void set(int n, RegisterSpec spec) { set0(n, spec); }
/** * Sets the element at the given index. * * @param n {@code >= 0, < size();} which element * @param spec {@code non-null;} the value to store */ public void set(int n, RegisterSpec spec) { set0(n, spec); }
/** * Sets the element at the given index. * * @param n {@code >= 0, < size();} which element * @param spec {@code non-null;} the value to store */ public void set(int n, RegisterSpec spec) { set0(n, spec); }
/** * Sets the element at the given index. * * @param n {@code >= 0, < size();} which element * @param spec {@code non-null;} the value to store */ public void set(int n, RegisterSpec spec) { set0(n, spec); }
/** * Sets the element at the given index. * * @param n {@code >= 0, < size();} which element * @param spec {@code non-null;} the value to store */ public void set(int n, RegisterSpec spec) { set0(n, spec); }
/** * Sets the element at the given index. * * @param n {@code >= 0, < size();} which element * @param spec {@code non-null;} the value to store */ public void set(int n, RegisterSpec spec) { set0(n, spec); }
/** * Returns a new instance, which is the same as this instance, * except that it has an additional element prepended to the original. * Mutability of the result is inherited from the original. * * @param spec {@code non-null;} the new first spec (to prepend) * @return {@code non-null;} an appropriately-constructed instance */ public RegisterSpecList withFirst(RegisterSpec spec) { int sz = size(); RegisterSpecList result = new RegisterSpecList(sz + 1); for (int i = 0; i < sz; i++) { result.set0(i + 1, get0(i)); } result.set0(0, spec); if (isImmutable()) { result.setImmutable(); } return result; }
/** * Returns a new instance, which is the same as this instance, * except that it has an additional element prepended to the original. * Mutability of the result is inherited from the original. * * @param spec {@code non-null;} the new first spec (to prepend) * @return {@code non-null;} an appropriately-constructed instance */ public RegisterSpecList withFirst(RegisterSpec spec) { int sz = size(); RegisterSpecList result = new RegisterSpecList(sz + 1); for (int i = 0; i < sz; i++) { result.set0(i + 1, get0(i)); } result.set0(0, spec); if (isImmutable()) { result.setImmutable(); } return result; }
/** * Returns a new instance, which is the same as this instance, * except that it has an additional element prepended to the original. * Mutability of the result is inherited from the original. * * @param spec {@code non-null;} the new first spec (to prepend) * @return {@code non-null;} an appropriately-constructed instance */ public RegisterSpecList withFirst(RegisterSpec spec) { int sz = size(); RegisterSpecList result = new RegisterSpecList(sz + 1); for (int i = 0; i < sz; i++) { result.set0(i + 1, get0(i)); } result.set0(0, spec); if (isImmutable()) { result.setImmutable(); } return result; }
/** * Returns a new instance, which is the same as this instance, * except that it has an additional element prepended to the original. * Mutability of the result is inherited from the original. * * @param spec {@code non-null;} the new first spec (to prepend) * @return {@code non-null;} an appropriately-constructed instance */ public RegisterSpecList withFirst(RegisterSpec spec) { int sz = size(); RegisterSpecList result = new RegisterSpecList(sz + 1); for (int i = 0; i < sz; i++) { result.set0(i + 1, get0(i)); } result.set0(0, spec); if (isImmutable()) { result.setImmutable(); } return result; }
/** * Returns a new instance, which is the same as this instance, * except that it has an additional element prepended to the original. * Mutability of the result is inherited from the original. * * @param spec {@code non-null;} the new first spec (to prepend) * @return {@code non-null;} an appropriately-constructed instance */ public RegisterSpecList withFirst(RegisterSpec spec) { int sz = size(); RegisterSpecList result = new RegisterSpecList(sz + 1); for (int i = 0; i < sz; i++) { result.set0(i + 1, get0(i)); } result.set0(0, spec); if (isImmutable()) { result.setImmutable(); } return result; }
/** * Returns a new instance, which is the same as this instance, * except that it has an additional element prepended to the original. * Mutability of the result is inherited from the original. * * @param spec {@code non-null;} the new first spec (to prepend) * @return {@code non-null;} an appropriately-constructed instance */ public RegisterSpecList withFirst(RegisterSpec spec) { int sz = size(); RegisterSpecList result = new RegisterSpecList(sz + 1); for (int i = 0; i < sz; i++) { result.set0(i + 1, get0(i)); } result.set0(0, spec); if (isImmutable()) { result.setImmutable(); } return result; }
/** * Returns a new instance, which is the same as this instance, * except that it has an additional element prepended to the original. * Mutability of the result is inherited from the original. * * @param spec {@code non-null;} the new first spec (to prepend) * @return {@code non-null;} an appropriately-constructed instance */ public RegisterSpecList withFirst(RegisterSpec spec) { int sz = size(); RegisterSpecList result = new RegisterSpecList(sz + 1); for (int i = 0; i < sz; i++) { result.set0(i + 1, get0(i)); } result.set0(0, spec); if (isImmutable()) { result.setImmutable(); } return result; }
/** * Returns a new instance, which is the same as this instance, * except that it has an additional element prepended to the original. * Mutability of the result is inherited from the original. * * @param spec {@code non-null;} the new first spec (to prepend) * @return {@code non-null;} an appropriately-constructed instance */ public RegisterSpecList withFirst(RegisterSpec spec) { int sz = size(); RegisterSpecList result = new RegisterSpecList(sz + 1); for (int i = 0; i < sz; i++) { result.set0(i + 1, get0(i)); } result.set0(0, spec); if (isImmutable()) { result.setImmutable(); } return result; }
/** * Returns a new instance, which is the same as this instance, * except that its last element is removed. Mutability of the * result is inherited from the original. * * @return {@code non-null;} an appropriately-constructed instance */ public RegisterSpecList withoutLast() { int newSize = size() - 1; if (newSize == 0) { return EMPTY; } RegisterSpecList result = new RegisterSpecList(newSize); for (int i = 0; i < newSize; i++) { result.set0(i, get0(i)); } if (isImmutable()) { result.setImmutable(); } return result; }
/** * Returns a new instance, which is the same as this instance, * except that its last element is removed. Mutability of the * result is inherited from the original. * * @return {@code non-null;} an appropriately-constructed instance */ public RegisterSpecList withoutLast() { int newSize = size() - 1; if (newSize == 0) { return EMPTY; } RegisterSpecList result = new RegisterSpecList(newSize); for (int i = 0; i < newSize; i++) { result.set0(i, get0(i)); } if (isImmutable()) { result.setImmutable(); } return result; }
/** * Returns a new instance, which is the same as this instance, * except that its first element is removed. Mutability of the * result is inherited from the original. * * @return {@code non-null;} an appropriately-constructed instance */ public RegisterSpecList withoutFirst() { int newSize = size() - 1; if (newSize == 0) { return EMPTY; } RegisterSpecList result = new RegisterSpecList(newSize); for (int i = 0; i < newSize; i++) { result.set0(i, get0(i + 1)); } if (isImmutable()) { result.setImmutable(); } return result; }
/** * Returns a new instance, which is the same as this instance, * except that its last element is removed. Mutability of the * result is inherited from the original. * * @return {@code non-null;} an appropriately-constructed instance */ public RegisterSpecList withoutLast() { int newSize = size() - 1; if (newSize == 0) { return EMPTY; } RegisterSpecList result = new RegisterSpecList(newSize); for (int i = 0; i < newSize; i++) { result.set0(i, get0(i)); } if (isImmutable()) { result.setImmutable(); } return result; }