Package com.google.common.collect
Class Lists.StringAsImmutableList
- java.lang.Object
-
- java.util.AbstractCollection<E>
-
- com.google.common.collect.ImmutableCollection<E>
-
- com.google.common.collect.ImmutableList<java.lang.Character>
-
- com.google.common.collect.Lists.StringAsImmutableList
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Iterable<java.lang.Character>,java.util.Collection<java.lang.Character>,java.util.List<java.lang.Character>,java.util.RandomAccess
- Enclosing class:
- Lists
private static final class Lists.StringAsImmutableList extends ImmutableList<java.lang.Character>
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.google.common.collect.ImmutableList
ImmutableList.Builder<E>, ImmutableList.SerializedForm, ImmutableList.SubList
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.Stringstring-
Fields inherited from class com.google.common.collect.ImmutableCollection
SPLITERATOR_CHARACTERISTICS
-
-
Constructor Summary
Constructors Constructor Description StringAsImmutableList(java.lang.String string)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Characterget(int index)intindexOf(java.lang.Object object)(package private) booleanisPartialView()Returnstrueif this immutable collection's implementation contains references to user-created objects that aren't accessible via this collection's methods.intlastIndexOf(java.lang.Object object)intsize()ImmutableList<java.lang.Character>subList(int fromIndex, int toIndex)Returns an immutable list of the elements between the specifiedfromIndex, inclusive, andtoIndex, exclusive.-
Methods inherited from class com.google.common.collect.ImmutableList
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
-
Methods inherited from class com.google.common.collect.ImmutableCollection
add, addAll, clear, internalArray, internalArrayEnd, internalArrayStart, remove, removeAll, removeIf, retainAll, toArray, toArray
-
-
-
-
Method Detail
-
indexOf
public int indexOf(java.lang.Object object)
- Specified by:
indexOfin interfacejava.util.List<java.lang.Character>- Overrides:
indexOfin classImmutableList<java.lang.Character>
-
lastIndexOf
public int lastIndexOf(java.lang.Object object)
- Specified by:
lastIndexOfin interfacejava.util.List<java.lang.Character>- Overrides:
lastIndexOfin classImmutableList<java.lang.Character>
-
subList
public ImmutableList<java.lang.Character> subList(int fromIndex, int toIndex)
Description copied from class:ImmutableListReturns an immutable list of the elements between the specifiedfromIndex, inclusive, andtoIndex, exclusive. (IffromIndexandtoIndexare equal, the empty immutable list is returned.)- Specified by:
subListin interfacejava.util.List<java.lang.Character>- Overrides:
subListin classImmutableList<java.lang.Character>
-
isPartialView
boolean isPartialView()
Description copied from class:ImmutableCollectionReturnstrueif 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 whethercopyOfimplementations should make an explicit copy to avoid memory leaks.- Specified by:
isPartialViewin classImmutableCollection<java.lang.Character>
-
get
public java.lang.Character get(int index)
-
size
public int size()
- Specified by:
sizein interfacejava.util.Collection<java.lang.Character>- Specified by:
sizein interfacejava.util.List<java.lang.Character>- Specified by:
sizein classjava.util.AbstractCollection<java.lang.Character>
-
-