Package it.unimi.dsi.fastutil.objects
Class ObjectLists.SynchronizedRandomAccessList<K>
java.lang.Object
it.unimi.dsi.fastutil.objects.ObjectLists.SynchronizedList<K>
it.unimi.dsi.fastutil.objects.ObjectLists.SynchronizedRandomAccessList<K>
- All Implemented Interfaces:
ObjectCollection<K>
,ObjectIterable<K>
,ObjectList<K>
,Serializable
,Comparable<List<? extends K>>
,Iterable<K>
,Collection<K>
,List<K>
,RandomAccess
,SequencedCollection<K>
- Enclosing class:
ObjectLists
public static class ObjectLists.SynchronizedRandomAccessList<K>
extends ObjectLists.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.ObjectLists.SynchronizedList
add, addAll, addElements, addElements, compareTo, 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.ObjectList
addAll, addAll, spliterator
-
Method Details
-
subList
Description copied from interface:ObjectList
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 interfaceObjectList<K>
- Overrides:
subList
in classObjectLists.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:ObjectCollection
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 interfaceObjectCollection<K>
- Specified by:
spliterator
in interfaceObjectIterable<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
-