private static final class Lists.StringAsImmutableList extends ImmutableList<java.lang.Character>
ImmutableList.Builder<E>, ImmutableList.SerializedForm, ImmutableList.SubList
Modifier and Type | Field and Description |
---|---|
private java.lang.String |
string |
SPLITERATOR_CHARACTERISTICS
Constructor and Description |
---|
StringAsImmutableList(java.lang.String string) |
Modifier and Type | Method and Description |
---|---|
java.lang.Character |
get(int index) |
int |
indexOf(java.lang.Object object) |
(package private) boolean |
isPartialView()
Returns
true if this immutable collection's implementation contains references to
user-created objects that aren't accessible via this collection's methods. |
int |
lastIndexOf(java.lang.Object object) |
int |
size() |
ImmutableList<java.lang.Character> |
subList(int fromIndex,
int toIndex)
Returns an immutable list of the elements between the specified
fromIndex , inclusive,
and toIndex , exclusive. |
add, addAll, asImmutableList, asImmutableList, asList, builder, builderWithExpectedSize, contains, copyIntoArray, copyOf, copyOf, copyOf, copyOf, equals, forEach, hashCode, iterator, listIterator, listIterator, of, of, of, of, of, of, of, of, of, of, of, of, of, remove, replaceAll, reverse, set, sort, sortedCopyOf, sortedCopyOf, spliterator, subListUnchecked, toImmutableList, writeReplace
add, addAll, clear, remove, removeAll, removeIf, retainAll, toArray, toArray
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
public int indexOf(java.lang.Object object)
indexOf
in interface java.util.List<java.lang.Character>
indexOf
in class ImmutableList<java.lang.Character>
public int lastIndexOf(java.lang.Object object)
lastIndexOf
in interface java.util.List<java.lang.Character>
lastIndexOf
in class ImmutableList<java.lang.Character>
public ImmutableList<java.lang.Character> subList(int fromIndex, int toIndex)
ImmutableList
fromIndex
, inclusive,
and toIndex
, exclusive. (If fromIndex
and toIndex
are equal, the empty
immutable list is returned.)subList
in interface java.util.List<java.lang.Character>
subList
in class ImmutableList<java.lang.Character>
boolean isPartialView()
ImmutableCollection
true
if this immutable collection's implementation contains references to
user-created objects that aren't accessible via this collection's methods. This is generally
used to determine whether copyOf
implementations should make an explicit copy to avoid
memory leaks.isPartialView
in class ImmutableCollection<java.lang.Character>
public java.lang.Character get(int index)
public int size()
size
in interface java.util.Collection<java.lang.Character>
size
in interface java.util.List<java.lang.Character>
size
in class java.util.AbstractCollection<java.lang.Character>