Lines Matching defs:ImmutableList

42  * ImmutableList} contains its own private data and will <i>never</i> change.
43 * {@code ImmutableList} is convenient for {@code public static final} lists
58 public abstract class ImmutableList<E> extends ImmutableCollection<E>
67 public static <E> ImmutableList<E> of() {
68 return (ImmutableList<E>) EmptyImmutableList.INSTANCE;
79 public static <E> ImmutableList<E> of(E element) {
88 public static <E> ImmutableList<E> of(E e1, E e2) {
97 public static <E> ImmutableList<E> of(E e1, E e2, E e3) {
106 public static <E> ImmutableList<E> of(E e1, E e2, E e3, E e4) {
115 public static <E> ImmutableList<E> of(E e1, E e2, E e3, E e4, E e5) {
124 public static <E> ImmutableList<E> of(E e1, E e2, E e3, E e4, E e5, E e6) {
133 public static <E> ImmutableList<E> of(
143 public static <E> ImmutableList<E> of(
153 public static <E> ImmutableList<E> of(
163 public static <E> ImmutableList<E> of(
173 public static <E> ImmutableList<E> of(
187 public static <E> ImmutableList<E> of(
215 public static <E> ImmutableList<E> copyOf(Iterable<? extends E> elements) {
230 * ImmutableList.copyOf(list)} returns an {@code ImmutableList<String>}
232 * ImmutableList.of(list)} returns an {@code ImmutableList<List<String>>}
241 public static <E> ImmutableList<E> copyOf(Collection<? extends E> elements) {
244 ImmutableList<E> list = ((ImmutableCollection<E>) elements).asList();
255 public static <E> ImmutableList<E> copyOf(Iterator<? extends E> elements) {
265 public static <E> ImmutableList<E> copyOf(E[] elements) {
268 return ImmutableList.of();
276 private static <E> ImmutableList<E> copyFromCollection(
284 ImmutableList<E> list = new SingletonImmutableList<E>((E) elements[0]);
294 private static <E> ImmutableList<E> construct(Object... elements) {
310 ImmutableList() {}
332 // constrain the return type to ImmutableList<E>
341 public abstract ImmutableList<E> subList(int fromIndex, int toIndex);
388 @Override public ImmutableList<E> asList() {
394 * ImmutableList.of(1, 2, 3).reverse()} is equivalent to {@code
395 * ImmutableList.of(3, 2, 1)}.
400 public ImmutableList<E> reverse() {
404 private static class ReverseImmutableList<E> extends ImmutableList<E> {
405 private transient final ImmutableList<E> forwardList;
408 ReverseImmutableList(ImmutableList<E> backingList) {
421 @Override public ImmutableList<E> reverse() {
443 @Override public ImmutableList<E> subList(int fromIndex, int toIndex) {
542 * public static final ImmutableList<Color> GOOGLE_COLORS
543 * = new ImmutableList.Builder<Color>()
559 * generated by {@link ImmutableList#builder}.
564 * Adds {@code element} to the {@code ImmutableList}.
576 * Adds each element of {@code elements} to the {@code ImmutableList}.
578 * @param elements the {@code Iterable} to add to the {@code ImmutableList}
593 * Adds each element of {@code elements} to the {@code ImmutableList}.
595 * @param elements the {@code Iterable} to add to the {@code ImmutableList}
607 * Adds each element of {@code elements} to the {@code ImmutableList}.
609 * @param elements the {@code Iterable} to add to the {@code ImmutableList}
620 * Returns a newly-created {@code ImmutableList} based on the contents of
623 @Override public ImmutableList<E> build() {