Lines Matching defs:elements

33  * An immutable collection. Does not permit null elements.
36 * #asList()} method, which returns a list view of the collection's elements.
53 * Returns an unmodifiable iterator across the elements in this collection.
220 throw new AssertionError("cannot store more than MAX_VALUE elements");
250 * Adds each element of {@code elements} to the {@code ImmutableCollection}
256 * @param elements the elements to add
258 * @throws NullPointerException if {@code elements} is null or contains a
261 public Builder<E> add(E... elements) {
262 for (E element : elements) {
269 * Adds each element of {@code elements} to the {@code ImmutableCollection}
275 * @param elements the elements to add
277 * @throws NullPointerException if {@code elements} is null or contains a
280 public Builder<E> addAll(Iterable<? extends E> elements) {
281 for (E element : elements) {
288 * Adds each element of {@code elements} to the {@code ImmutableCollection}
294 * @param elements the elements to add
296 * @throws NullPointerException if {@code elements} is null or contains a
299 public Builder<E> addAll(Iterator<? extends E> elements) {
300 while (elements.hasNext()) {
301 add(elements.next());
308 * type, containing the elements provided to this builder.
328 * the specified number of elements without being resized.
346 public Builder<E> add(E... elements) {
347 checkElementsNotNull(elements);
348 ensureCapacity(size + elements.length);
349 System.arraycopy(elements, 0, contents, size, elements.length);
350 size += elements.length;
355 public Builder<E> addAll(Iterable<? extends E> elements) {
356 if (elements instanceof Collection) {
357 Collection<?> collection = (Collection<?>) elements;
360 super.addAll(elements);