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
,SequencedCollection<K>
- 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 TypeMethodDescriptionboolean
boolean
addAll
(Collection<? extends K> c) void
clear()
boolean
boolean
containsAll
(Collection<?> c) void
boolean
isEmpty()
boolean
boolean
removeAll
(Collection<?> c) boolean
retainAll
(Collection<?> c) int
size()
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, unstableSort
Methods inherited from interface java.util.Collection
parallelStream, stream, toArray
Methods inherited from interface java.util.List
add, addAll, addFirst, addLast, clear, contains, containsAll, getFirst, getLast, isEmpty, remove, removeAll, removeFirst, removeLast, retainAll, reversed, size, toArray, toArray
Methods inherited from interface it.unimi.dsi.fastutil.objects.ReferenceList
addAll, addAll, spliterator
-
Method Details
-
subList
Description copied from interface:ReferenceList
Returns a type-specific view of the portion of this list from the indexfrom
, inclusive, to the indexto
, exclusive.- Specified by:
subList
in interfaceList<K>
- Specified by:
subList
in interfaceReferenceList<K>
- Overrides:
subList
in classReferenceLists.SynchronizedList<K>
- See Also:
-
add
- Specified by:
add
in interfaceCollection<K>
-
contains
- Specified by:
contains
in interfaceCollection<K>
-
remove
- Specified by:
remove
in interfaceCollection<K>
-
size
public int size()- Specified by:
size
in interfaceCollection<K>
-
isEmpty
public boolean isEmpty()- Specified by:
isEmpty
in interfaceCollection<K>
-
toArray
- Specified by:
toArray
in interfaceCollection<K>
-
toArray
public <T> T[] toArray(T[] a) - Specified by:
toArray
in interfaceCollection<K>
-
spliterator
Description copied from interface:ReferenceCollection
Returns 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:
spliterator
in interfaceCollection<K>
- Specified by:
spliterator
in interfaceIterable<K>
- Specified by:
spliterator
in interfaceObjectIterable<K>
- Specified by:
spliterator
in interfaceReferenceCollection<K>
- Returns:
- a type-specific spliterator on the elements of this collection.
-
stream
- Specified by:
stream
in interfaceCollection<K>
-
parallelStream
- Specified by:
parallelStream
in interfaceCollection<K>
-
forEach
-
addAll
- Specified by:
addAll
in interfaceCollection<K>
-
containsAll
- Specified by:
containsAll
in interfaceCollection<K>
-
removeAll
- Specified by:
removeAll
in interfaceCollection<K>
-
retainAll
- Specified by:
retainAll
in interfaceCollection<K>
-
clear
public void clear()- Specified by:
clear
in interfaceCollection<K>
-
toString
-