Пример #1
0
 /**
  * Adds each element of {@code elements} to the {@code ImmutableList}.
  *
  * @param elements the {@code Iterable} to add to the {@code ImmutableList}
  * @return this {@code Builder} object
  * @throws NullPointerException if {@code elements} is null or contains a null element
  */
 @Override
 public Builder<E> add(E... elements) {
   super.add(elements);
   return this;
 }
Пример #2
0
 /**
  * Adds each element of {@code elements} to the {@code ImmutableList}.
  *
  * @param elements the {@code Iterable} to add to the {@code ImmutableList}
  * @return this {@code Builder} object
  * @throws NullPointerException if {@code elements} is null or contains a null element
  */
 @Override
 public Builder<E> addAll(Iterator<? extends E> elements) {
   super.addAll(elements);
   return this;
 }
Пример #3
0
 /**
  * Adds {@code element} to the {@code ImmutableList}.
  *
  * @param element the element to add
  * @return this {@code Builder} object
  * @throws NullPointerException if {@code element} is null
  */
 @Override
 public Builder<E> add(E element) {
   super.add(element);
   return this;
 }