Package it.unimi.dsi.fastutil.objects
Class ReferenceBigLists.SynchronizedBigList<K>
java.lang.Object
it.unimi.dsi.fastutil.objects.ReferenceBigLists.SynchronizedBigList<K>
- All Implemented Interfaces:
it.unimi.dsi.fastutil.BigList<K>,it.unimi.dsi.fastutil.objects.ObjectIterable<K>,ReferenceBigList<K>,it.unimi.dsi.fastutil.objects.ReferenceCollection<K>,it.unimi.dsi.fastutil.Size64,Serializable,Iterable<K>,Collection<K>
- Enclosing class:
ReferenceBigLists
public static class ReferenceBigLists.SynchronizedBigList<K>
extends Object
implements ReferenceBigList<K>, Serializable
A synchronized wrapper class for big lists.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final it.unimi.dsi.fastutil.objects.ReferenceCollection<K> protected final ReferenceBigList<K> protected final Object -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedprotectedSynchronizedBigList(ReferenceBigList<K> l, Object sync) -
Method Summary
Modifier and TypeMethodDescriptionvoidbooleanbooleanaddAll(long index, Collection<? extends K> c) booleanaddAll(Collection<? extends K> arg0) voidaddElements(long index, K[][] a) Add (hopefully quickly) elements to this type-specific big list.voidaddElements(long index, K[][] a, long offset, long length) Add (hopefully quickly) elements to this type-specific big list.voidclear()booleanbooleancontainsAll(Collection<?> arg0) booleanvoidget(long i) voidgetElements(long from, Object[][] a, long offset, long length) Copies (hopefully quickly) elements of this type-specific big list into the given big array.inthashCode()longbooleanisEmpty()it.unimi.dsi.fastutil.objects.ObjectBigListIterator<K> iterator()Returns a type-specific iterator on the elements of this list.longit.unimi.dsi.fastutil.objects.ObjectBigListIterator<K> Returns a type-specific big-list iterator on this type-specific big list.it.unimi.dsi.fastutil.objects.ObjectBigListIterator<K> listIterator(long i) Returns a type-specific list iterator on this type-specific big list starting at a given index.remove(long i) booleanbooleanremoveAll(Collection<?> arg0) voidremoveElements(long from, long to) Removes (hopefully quickly) elements of this type-specific big list.booleanbooleanretainAll(Collection<?> arg0) intsize()voidsize(long size) Deprecated.longsize64()it.unimi.dsi.fastutil.objects.ObjectSpliterator<K> stream()subList(long from, long to) Returns a type-specific view of the portion of this type-specific big list from the indexfrom, inclusive, to the indexto, exclusive.Object[]toArray()<T> T[]toArray(T[] arg0) toString()Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface it.unimi.dsi.fastutil.BigList
sizeMethods inherited from interface java.util.Collection
add, addAll, clear, contains, containsAll, isEmpty, parallelStream, remove, removeAll, removeIf, retainAll, stream, toArray, toArray, toArrayMethods inherited from interface it.unimi.dsi.fastutil.objects.ReferenceBigList
addAll, addAll, addAll, addAll, getElements, setElements, setElements, setElements, spliterator
-
Field Details
-
list
-
collection
-
sync
-
-
Constructor Details
-
SynchronizedBigList
-
SynchronizedBigList
-
-
Method Details
-
get
- Specified by:
getin interfaceit.unimi.dsi.fastutil.BigList<K>
-
set
- Specified by:
setin interfaceit.unimi.dsi.fastutil.BigList<K>
-
add
- Specified by:
addin interfaceit.unimi.dsi.fastutil.BigList<K>
-
remove
- Specified by:
removein interfaceit.unimi.dsi.fastutil.BigList<K>
-
indexOf
- Specified by:
indexOfin interfaceit.unimi.dsi.fastutil.BigList<K>
-
lastIndexOf
- Specified by:
lastIndexOfin interfaceit.unimi.dsi.fastutil.BigList<K>
-
addAll
- Specified by:
addAllin interfaceit.unimi.dsi.fastutil.BigList<K>
-
getElements
Description copied from interface:ReferenceBigListCopies (hopefully quickly) elements of this type-specific big list into the given big array.- Specified by:
getElementsin interfaceReferenceBigList<K>- Parameters:
from- the start index (inclusive).a- the destination big array.offset- the offset into the destination big array where to store the first element copied.length- the number of elements to be copied.
-
removeElements
public void removeElements(long from, long to) Description copied from interface:ReferenceBigListRemoves (hopefully quickly) elements of this type-specific big list.- Specified by:
removeElementsin interfaceReferenceBigList<K>- Parameters:
from- the start index (inclusive).to- the end index (exclusive).
-
addElements
Description copied from interface:ReferenceBigListAdd (hopefully quickly) elements to this type-specific big list.- Specified by:
addElementsin interfaceReferenceBigList<K>- Parameters:
index- the index at which to add elements.a- the big array containing the elements.offset- the offset of the first element to add.length- the number of elements to add.
-
addElements
Description copied from interface:ReferenceBigListAdd (hopefully quickly) elements to this type-specific big list.- Specified by:
addElementsin interfaceReferenceBigList<K>- Parameters:
index- the index at which to add elements.a- the big array containing the elements.
-
size
Deprecated.- Specified by:
sizein interfaceit.unimi.dsi.fastutil.BigList<K>
-
size64
public long size64()- Specified by:
size64in interfaceit.unimi.dsi.fastutil.Size64
-
iterator
Description copied from interface:ReferenceBigListReturns a type-specific iterator on the elements of this list.- Specified by:
iteratorin interfaceCollection<K>- Specified by:
iteratorin interfaceIterable<K>- Specified by:
iteratorin interfaceit.unimi.dsi.fastutil.objects.ObjectIterable<K>- Specified by:
iteratorin interfaceReferenceBigList<K>- Specified by:
iteratorin interfaceit.unimi.dsi.fastutil.objects.ReferenceCollection<K>- See Also:
-
listIterator
Description copied from interface:ReferenceBigListReturns a type-specific big-list iterator on this type-specific big list.- Specified by:
listIteratorin interfaceit.unimi.dsi.fastutil.BigList<K>- Specified by:
listIteratorin interfaceReferenceBigList<K>- See Also:
-
listIterator
Description copied from interface:ReferenceBigListReturns a type-specific list iterator on this type-specific big list starting at a given index.- Specified by:
listIteratorin interfaceit.unimi.dsi.fastutil.BigList<K>- Specified by:
listIteratorin interfaceReferenceBigList<K>- See Also:
-
subList
Description copied from interface:ReferenceBigListReturns a type-specific view of the portion of this type-specific big list from the indexfrom, inclusive, to the indexto, exclusive.- Specified by:
subListin interfaceit.unimi.dsi.fastutil.BigList<K>- Specified by:
subListin interfaceReferenceBigList<K>- See Also:
-
equals
- Specified by:
equalsin interfaceCollection<K>
-
hashCode
public int hashCode()- Specified by:
hashCodein interfaceCollection<K>
-
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[] arg0) - Specified by:
toArrayin interfaceCollection<K>
-
spliterator
- Specified by:
spliteratorin interfaceCollection<K>- Specified by:
spliteratorin interfaceIterable<K>- Specified by:
spliteratorin interfaceit.unimi.dsi.fastutil.objects.ObjectIterable<K>- Specified by:
spliteratorin interfaceit.unimi.dsi.fastutil.objects.ReferenceCollection<K>
-
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>
-
removeIf
- Specified by:
removeIfin interfaceCollection<K>
-
clear
public void clear()- Specified by:
clearin interfaceCollection<K>
-
toString
-