Package it.unimi.dsi.fastutil.objects
Class ReferenceLists.UnmodifiableRandomAccessList<K>
java.lang.Object
it.unimi.dsi.fastutil.objects.ReferenceLists.UnmodifiableList<K>
it.unimi.dsi.fastutil.objects.ReferenceLists.UnmodifiableRandomAccessList<K>
- All Implemented Interfaces:
it.unimi.dsi.fastutil.objects.ObjectIterable<K>,ReferenceCollection<K>,ReferenceList<K>,java.io.Serializable,java.lang.Iterable<K>,java.util.Collection<K>,java.util.List<K>,java.util.RandomAccess
- Enclosing class:
- ReferenceLists
public static class ReferenceLists.UnmodifiableRandomAccessList<K> extends ReferenceLists.UnmodifiableList<K> implements java.util.RandomAccess, java.io.Serializable
An unmodifiable wrapper class for random-access lists.
- See Also:
- Serialized Form
-
Method Summary
Modifier and Type Method Description booleanadd(K k)booleanaddAll(java.util.Collection<? extends K> c)voidclear()booleancontains(java.lang.Object o)booleancontainsAll(java.util.Collection<?> c)voidforEach(java.util.function.Consumer<? super K> action)booleanisEmpty()java.util.stream.Stream<K>parallelStream()booleanremove(java.lang.Object k)booleanremoveAll(java.util.Collection<?> c)booleanremoveIf(java.util.function.Predicate<? super K> filter)booleanretainAll(java.util.Collection<?> c)intsize()it.unimi.dsi.fastutil.objects.ObjectSpliterator<K>spliterator()Returns a type-specific spliterator on the elements of this collection.java.util.stream.Stream<K>stream()ReferenceList<K>subList(int from, int to)Returns a type-specific view of the portion of this list from the indexfrom, inclusive, to the indexto, exclusive.java.lang.Object[]toArray()<T> T[]toArray(T[] a)java.lang.StringtoString()Methods inherited from class it.unimi.dsi.fastutil.objects.ReferenceLists.UnmodifiableList
add, addAll, addElements, addElements, equals, get, getElements, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, remove, removeElements, replaceAll, set, setElements, setElements, setElements, size, sort, unstableSortMethods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArrayMethods inherited from interface java.lang.Iterable
forEachMethods inherited from interface java.util.List
add, addAll, clear, contains, containsAll, isEmpty, remove, removeAll, retainAll, size, toArray, toArrayMethods inherited from interface it.unimi.dsi.fastutil.objects.ReferenceList
addAll, addAll, spliterator
-
Method Details
-
subList
Description copied from interface:ReferenceListReturns a type-specific view of the portion of this list from the indexfrom, inclusive, to the indexto, exclusive.- Specified by:
subListin interfacejava.util.List<K>- Specified by:
subListin interfaceReferenceList<K>- Overrides:
subListin classReferenceLists.UnmodifiableList<K>- See Also:
List.subList(int,int)
-
add
- Specified by:
addin interfacejava.util.Collection<K>
-
remove
public boolean remove(java.lang.Object k)- Specified by:
removein interfacejava.util.Collection<K>
-
size
public int size()- Specified by:
sizein interfacejava.util.Collection<K>
-
isEmpty
public boolean isEmpty()- Specified by:
isEmptyin interfacejava.util.Collection<K>
-
contains
public boolean contains(java.lang.Object o)- Specified by:
containsin interfacejava.util.Collection<K>
-
spliterator
Description copied from interface:ReferenceCollectionReturns a type-specific spliterator on the elements of this collection.See
Collection.spliterator()for more documentation on the requirements of the returned spliterator.- Specified by:
spliteratorin interfacejava.util.Collection<K>- Specified by:
spliteratorin interfacejava.lang.Iterable<K>- Specified by:
spliteratorin interfaceit.unimi.dsi.fastutil.objects.ObjectIterable<K>- Specified by:
spliteratorin interfaceReferenceCollection<K>- Returns:
- a type-specific spliterator on the elements of this collection.
-
stream
- Specified by:
streamin interfacejava.util.Collection<K>
-
parallelStream
- Specified by:
parallelStreamin interfacejava.util.Collection<K>
-
clear
public void clear()- Specified by:
clearin interfacejava.util.Collection<K>
-
toArray
public <T> T[] toArray(T[] a)- Specified by:
toArrayin interfacejava.util.Collection<K>
-
toArray
public java.lang.Object[] toArray()- Specified by:
toArrayin interfacejava.util.Collection<K>
-
forEach
- Specified by:
forEachin interfacejava.lang.Iterable<K>
-
containsAll
public boolean containsAll(java.util.Collection<?> c)- Specified by:
containsAllin interfacejava.util.Collection<K>
-
addAll
- Specified by:
addAllin interfacejava.util.Collection<K>
-
removeAll
public boolean removeAll(java.util.Collection<?> c)- Specified by:
removeAllin interfacejava.util.Collection<K>
-
retainAll
public boolean retainAll(java.util.Collection<?> c)- Specified by:
retainAllin interfacejava.util.Collection<K>
-
removeIf
- Specified by:
removeIfin interfacejava.util.Collection<K>
-
toString
public java.lang.String toString()- Overrides:
toStringin classjava.lang.Object
-