Package it.unimi.dsi.fastutil.objects
Class ReferenceLists.SynchronizedRandomAccessList<K>
java.lang.Object
it.unimi.dsi.fastutil.objects.ReferenceLists.SynchronizedList<K>
it.unimi.dsi.fastutil.objects.ReferenceLists.SynchronizedRandomAccessList<K>
- All Implemented Interfaces:
ObjectIterable<K>,ReferenceCollection<K>,ReferenceList<K>,Serializable,Iterable<K>,Collection<K>,List<K>,RandomAccess
- Enclosing class:
ReferenceLists
public static class ReferenceLists.SynchronizedRandomAccessList<K>
extends ReferenceLists.SynchronizedList<K>
implements RandomAccess, Serializable
A synchronized wrapper class for random-access lists.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionbooleanbooleanaddAll(Collection<? extends K> c) voidclear()booleanbooleancontainsAll(Collection<?> c) voidbooleanisEmpty()booleanbooleanremoveAll(Collection<?> c) booleanretainAll(Collection<?> c) intsize()Returns a type-specific spliterator on the elements of this collection.stream()subList(int from, int to) Returns a type-specific view of the portion of this list from the indexfrom, inclusive, to the indexto, exclusive.Object[]toArray()<T> T[]toArray(T[] a) toString()Methods inherited from class it.unimi.dsi.fastutil.objects.ReferenceLists.SynchronizedList
add, addAll, addElements, addElements, equals, get, getElements, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, remove, removeElements, removeIf, replaceAll, set, setElements, setElements, setElements, size, sort, unstableSortMethods inherited from interface java.util.Collection
parallelStream, stream, toArrayMethods 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 interfaceList<K>- Specified by:
subListin interfaceReferenceList<K>- Overrides:
subListin classReferenceLists.SynchronizedList<K>- See Also:
-
add
- Specified by:
addin interfaceCollection<K>
-
contains
- Specified by:
containsin interfaceCollection<K>
-
remove
- Specified by:
removein interfaceCollection<K>
-
size
public int size()- Specified by:
sizein interfaceCollection<K>
-
isEmpty
public boolean isEmpty()- Specified by:
isEmptyin interfaceCollection<K>
-
toArray
- Specified by:
toArrayin interfaceCollection<K>
-
toArray
public <T> T[] toArray(T[] a) - Specified by:
toArrayin interfaceCollection<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 interfaceCollection<K>- Specified by:
spliteratorin interfaceIterable<K>- Specified by:
spliteratorin interfaceObjectIterable<K>- Specified by:
spliteratorin interfaceReferenceCollection<K>- Returns:
- a type-specific spliterator on the elements of this collection.
-
stream
- Specified by:
streamin interfaceCollection<K>
-
parallelStream
- Specified by:
parallelStreamin interfaceCollection<K>
-
forEach
-
addAll
- Specified by:
addAllin interfaceCollection<K>
-
containsAll
- Specified by:
containsAllin interfaceCollection<K>
-
removeAll
- Specified by:
removeAllin interfaceCollection<K>
-
retainAll
- Specified by:
retainAllin interfaceCollection<K>
-
clear
public void clear()- Specified by:
clearin interfaceCollection<K>
-
toString
-