public class MutableList<V>
extends java.util.ArrayList<V>
| Modifier and Type | Class and Description | 
|---|---|
static class  | 
MutableList.Builder<V>  | 
| Constructor and Description | 
|---|
MutableList()  | 
MutableList(java.util.Collection<? extends V> source)  | 
MutableList(java.lang.Iterable<? extends V> source)  | 
| Modifier and Type | Method and Description | 
|---|---|
boolean | 
addAll(java.lang.Iterable<? extends V> setToAdd)  | 
boolean | 
addAll(java.util.Iterator<? extends V> setToAdd)  | 
MutableList<V> | 
append(V item)
as  
List.add(Object) but fluent style  | 
MutableList<V> | 
append(V item1,
      V item2,
      V... items)
as  
List.add(Object) but accepting multiple, and fluent style  | 
MutableList<V> | 
appendAll(java.lang.Iterable<? extends V> items)
as  
List.addAll(Collection) but fluent style  | 
MutableList<V> | 
appendAll(java.util.Iterator<? extends V> items)
as  
List.addAll(Collection) but fluent style  | 
MutableList<V> | 
appendIfNotNull(V item)
as  
List.add(Object) but excluding nulls, and fluent style  | 
MutableList<V> | 
appendIfNotNull(V item1,
               V item2,
               V... items)
as  
List.add(Object) but excluding nulls, accepting multiple, and fluent style  | 
java.util.List<V> | 
asImmutableCopy()
creates an  
ImmutableList which is a copy of this list. | 
java.util.List<V> | 
asUnmodifiable()
creates a  
Collections.unmodifiableList(List) wrapper around this list. | 
java.util.List<V> | 
asUnmodifiableCopy()
creates a  
Collections.unmodifiableList(List) of a copy of this list. | 
static <V> MutableList.Builder<V> | 
builder()  | 
static <V> MutableList<V> | 
copyOf(java.lang.Iterable<? extends V> orig)  | 
static <E> MutableList<E> | 
copyOf(java.util.Iterator<? extends E> elements)  | 
static <V> MutableList<V> | 
of()  | 
static <V> MutableList<V> | 
of(V v1)  | 
static <V> MutableList<V> | 
of(V v1,
  V v2,
  V... vv)  | 
boolean | 
removeIfNotNull(V item)  | 
com.google.common.collect.ImmutableList<V> | 
toImmutable()
Deprecated. 
 
 | 
public MutableList()
public MutableList(java.util.Collection<? extends V> source)
public MutableList(java.lang.Iterable<? extends V> source)
public static <V> MutableList<V> of()
public static <V> MutableList<V> of(V v1)
public static <V> MutableList<V> of(V v1, V v2, V... vv)
public static <V> MutableList<V> copyOf(@Nullable java.lang.Iterable<? extends V> orig)
public static <E> MutableList<E> copyOf(java.util.Iterator<? extends E> elements)
@Deprecated public com.google.common.collect.ImmutableList<V> toImmutable()
public java.util.List<V> asImmutableCopy()
ImmutableList which is a copy of this list.  note that the list should not contain nulls.public java.util.List<V> asUnmodifiable()
Collections.unmodifiableList(List) wrapper around this list. the method is efficient,
 as there is no copying, but the returned view might change if the list here is changed.public java.util.List<V> asUnmodifiableCopy()
Collections.unmodifiableList(List) of a copy of this list.
 the returned item is immutable, but unlike asImmutableCopy() nulls are permitted.public static <V> MutableList.Builder<V> builder()
public MutableList<V> append(V item)
List.add(Object) but fluent style public MutableList<V> appendIfNotNull(V item)
List.add(Object) but excluding nulls, and fluent style public MutableList<V> append(V item1, V item2, V... items)
List.add(Object) but accepting multiple, and fluent style public MutableList<V> appendIfNotNull(V item1, V item2, V... items)
List.add(Object) but excluding nulls, accepting multiple, and fluent style public MutableList<V> appendAll(java.lang.Iterable<? extends V> items)
List.addAll(Collection) but fluent style public MutableList<V> appendAll(java.util.Iterator<? extends V> items)
List.addAll(Collection) but fluent style public boolean addAll(java.lang.Iterable<? extends V> setToAdd)
public boolean addAll(java.util.Iterator<? extends V> setToAdd)
public boolean removeIfNotNull(V item)