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
-
Nested classes/interfaces inherited from class com.google.common.collect.ImmutableCollection
ImmutableCollection.ArrayBasedBuilder<E>
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.String
string
-
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.Character
get(int index)
int
indexOf(java.lang.Object object)
(package private) boolean
isPartialView()
Returnstrue
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 specifiedfromIndex
, inclusive, andtoIndex
, exclusive.-
Methods inherited from class com.google.common.collect.ImmutableList
add, addAll, asImmutableList, asImmutableList, asList, builder, contains, copyIntoArray, copyOf, copyOf, copyOf, copyOf, equals, hashCode, iterator, listIterator, listIterator, of, of, of, of, of, of, of, of, of, of, of, of, of, remove, reverse, set, subListUnchecked, writeReplace
-
Methods inherited from class com.google.common.collect.ImmutableCollection
add, addAll, clear, remove, removeAll, retainAll, toArray, toArray
-
-
-
-
Method Detail
-
indexOf
public int indexOf(@Nullable java.lang.Object object)
- Specified by:
indexOf
in interfacejava.util.List<java.lang.Character>
- Overrides:
indexOf
in classImmutableList<java.lang.Character>
-
lastIndexOf
public int lastIndexOf(@Nullable java.lang.Object object)
- Specified by:
lastIndexOf
in interfacejava.util.List<java.lang.Character>
- Overrides:
lastIndexOf
in classImmutableList<java.lang.Character>
-
subList
public ImmutableList<java.lang.Character> subList(int fromIndex, int toIndex)
Description copied from class:ImmutableList
Returns an immutable list of the elements between the specifiedfromIndex
, inclusive, andtoIndex
, exclusive. (IffromIndex
andtoIndex
are equal, the empty immutable list is returned.)- Specified by:
subList
in interfacejava.util.List<java.lang.Character>
- Overrides:
subList
in classImmutableList<java.lang.Character>
-
isPartialView
boolean isPartialView()
Description copied from class:ImmutableCollection
Returnstrue
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 whethercopyOf
implementations should make an explicit copy to avoid memory leaks.- Specified by:
isPartialView
in classImmutableCollection<java.lang.Character>
-
get
public java.lang.Character get(int index)
-
size
public int size()
- Specified by:
size
in interfacejava.util.Collection<java.lang.Character>
- Specified by:
size
in interfacejava.util.List<java.lang.Character>
- Specified by:
size
in classjava.util.AbstractCollection<java.lang.Character>
-
-