Package it.unimi.dsi.fastutil.shorts
Class ShortBigLists.SynchronizedBigList
java.lang.Object
it.unimi.dsi.fastutil.shorts.ShortBigLists.SynchronizedBigList
- All Implemented Interfaces:
it.unimi.dsi.fastutil.BigList<Short>,ShortBigList,it.unimi.dsi.fastutil.shorts.ShortCollection,it.unimi.dsi.fastutil.shorts.ShortIterable,it.unimi.dsi.fastutil.Size64,Serializable,Comparable<it.unimi.dsi.fastutil.BigList<? extends Short>>,Iterable<Short>,Collection<Short>
- Enclosing class:
ShortBigLists
public static class ShortBigLists.SynchronizedBigList
extends Object
implements ShortBigList, Serializable
A synchronized wrapper class for big lists.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final it.unimi.dsi.fastutil.shorts.ShortCollectionprotected final ShortBigListprotected final Object -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedprotectedSynchronizedBigList(ShortBigList l, Object sync) -
Method Summary
Modifier and TypeMethodDescriptionvoidadd(long i, short k) Inserts the specified element at the specified position in this type-specific big list (optional operation).voidDeprecated.Please use the corresponding type-specific method instead.booleanadd(short arg0) booleanDeprecated.booleanaddAll(long index, ShortBigList l) Inserts all of the elements in the specified type-specific big list into this type-specific big list at the specified position (optional operation).booleanaddAll(long index, it.unimi.dsi.fastutil.shorts.ShortCollection c) Inserts all of the elements in the specified type-specific collection into this type-specific big list at the specified position (optional operation).booleanaddAll(long index, Collection<? extends Short> c) booleanAppends all of the elements in the specified type-specific big list to the end of this type-specific big list (optional operation).booleanaddAll(it.unimi.dsi.fastutil.shorts.ShortCollection arg0) booleanaddAll(Collection<? extends Short> arg0) voidaddElements(long index, short[][] a) Add (hopefully quickly) elements to this type-specific big list.voidaddElements(long index, short[][] a, long offset, long length) Add (hopefully quickly) elements to this type-specific big list.voidclear()intbooleancontains(short arg0) booleanDeprecated.booleancontainsAll(it.unimi.dsi.fastutil.shorts.ShortCollection arg0) booleancontainsAll(Collection<?> arg0) booleanvoidforEach(it.unimi.dsi.fastutil.shorts.ShortConsumer arg0) get(long i) Deprecated.Please use the corresponding type-specific method instead.voidgetElements(long from, short[][] a, long offset, long length) Copies (hopefully quickly) elements of this type-specific big list into the given big array.shortgetShort(long i) Returns the element at the specified position.inthashCode()longindexOf(short k) Returns the index of the first occurrence of the specified element in this type-specific big list, or -1 if this big list does not contain the element.longDeprecated.Please use the corresponding type-specific method instead.it.unimi.dsi.fastutil.ints.IntIteratorit.unimi.dsi.fastutil.ints.IntSpliteratorbooleanisEmpty()it.unimi.dsi.fastutil.shorts.ShortBigListIteratoriterator()Returns a type-specific iterator on the elements of this list.longlastIndexOf(short k) Returns the index of the last occurrence of the specified element in this type-specific big list, or -1 if this big list does not contain the element.longDeprecated.Please use the corresponding type-specific method instead.it.unimi.dsi.fastutil.shorts.ShortBigListIteratorReturns a type-specific big-list iterator on this type-specific big list.it.unimi.dsi.fastutil.shorts.ShortBigListIteratorlistIterator(long i) Returns a type-specific list iterator on this type-specific big list starting at a given index.Deprecated.booleanrem(short arg0) remove(long i) Deprecated.Please use the corresponding type-specific method instead.booleanDeprecated.booleanremoveAll(it.unimi.dsi.fastutil.shorts.ShortCollection arg0) booleanremoveAll(Collection<?> arg0) voidremoveElements(long from, long to) Removes (hopefully quickly) elements of this type-specific big list.booleanremoveIf(it.unimi.dsi.fastutil.shorts.ShortPredicate arg0) shortremoveShort(long i) Removes the element at the specified position.booleanretainAll(it.unimi.dsi.fastutil.shorts.ShortCollection arg0) booleanretainAll(Collection<?> arg0) shortset(long i, short k) Replaces the element at the specified position in this big list with the specified element (optional operation).Deprecated.Please use the corresponding type-specific method instead.intsize()voidsize(long size) Deprecated.longsize64()it.unimi.dsi.fastutil.shorts.ShortSpliteratorstream()Deprecated.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()short[]toArray(short[] arg0) <T> T[]toArray(T[] arg0) short[]short[]toShortArray(short[] arg0) Deprecated.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
addAll, clear, containsAll, isEmpty, removeAll, retainAll, toArray, toArray, toArrayMethods inherited from interface it.unimi.dsi.fastutil.shorts.ShortBigList
addAll, addAll, getElements, setElements, setElements, setElements, spliteratorMethods inherited from interface it.unimi.dsi.fastutil.shorts.ShortCollection
add, add, addAll, contains, contains, containsAll, intIterator, intParallelStream, intSpliterator, intStream, parallelStream, rem, remove, removeAll, removeIf, removeIf, removeIf, retainAll, stream, toArray, toShortArray, toShortArrayMethods inherited from interface it.unimi.dsi.fastutil.shorts.ShortIterable
forEach, forEach, forEach
-
Field Details
-
list
-
collection
protected final it.unimi.dsi.fastutil.shorts.ShortCollection collection -
sync
-
-
Constructor Details
-
SynchronizedBigList
-
SynchronizedBigList
-
-
Method Details
-
getShort
public short getShort(long i) Description copied from interface:ShortBigListReturns the element at the specified position.- Specified by:
getShortin interfaceShortBigList- See Also:
-
set
public short set(long i, short k) Description copied from interface:ShortBigListReplaces the element at the specified position in this big list with the specified element (optional operation).- Specified by:
setin interfaceShortBigList- See Also:
-
add
public void add(long i, short k) Description copied from interface:ShortBigListInserts the specified element at the specified position in this type-specific big list (optional operation).- Specified by:
addin interfaceShortBigList- See Also:
-
removeShort
public short removeShort(long i) Description copied from interface:ShortBigListRemoves the element at the specified position.- Specified by:
removeShortin interfaceShortBigList- See Also:
-
indexOf
public long indexOf(short k) Description copied from interface:ShortBigListReturns the index of the first occurrence of the specified element in this type-specific big list, or -1 if this big list does not contain the element.- Specified by:
indexOfin interfaceShortBigList- See Also:
-
lastIndexOf
public long lastIndexOf(short k) Description copied from interface:ShortBigListReturns the index of the last occurrence of the specified element in this type-specific big list, or -1 if this big list does not contain the element.- Specified by:
lastIndexOfin interfaceShortBigList- See Also:
-
addAll
- Specified by:
addAllin interfaceit.unimi.dsi.fastutil.BigList<Short>
-
getElements
public void getElements(long from, short[][] a, long offset, long length) Description copied from interface:ShortBigListCopies (hopefully quickly) elements of this type-specific big list into the given big array.- Specified by:
getElementsin interfaceShortBigList- 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:ShortBigListRemoves (hopefully quickly) elements of this type-specific big list.- Specified by:
removeElementsin interfaceShortBigList- Parameters:
from- the start index (inclusive).to- the end index (exclusive).
-
addElements
public void addElements(long index, short[][] a, long offset, long length) Description copied from interface:ShortBigListAdd (hopefully quickly) elements to this type-specific big list.- Specified by:
addElementsin interfaceShortBigList- 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
public void addElements(long index, short[][] a) Description copied from interface:ShortBigListAdd (hopefully quickly) elements to this type-specific big list.- Specified by:
addElementsin interfaceShortBigList- 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<Short>
-
size64
public long size64()- Specified by:
size64in interfaceit.unimi.dsi.fastutil.Size64
-
iterator
public it.unimi.dsi.fastutil.shorts.ShortBigListIterator iterator()Description copied from interface:ShortBigListReturns a type-specific iterator on the elements of this list.- Specified by:
iteratorin interfaceCollection<Short>- Specified by:
iteratorin interfaceIterable<Short>- Specified by:
iteratorin interfaceShortBigList- Specified by:
iteratorin interfaceit.unimi.dsi.fastutil.shorts.ShortCollection- Specified by:
iteratorin interfaceit.unimi.dsi.fastutil.shorts.ShortIterable- See Also:
-
listIterator
public it.unimi.dsi.fastutil.shorts.ShortBigListIterator listIterator()Description copied from interface:ShortBigListReturns a type-specific big-list iterator on this type-specific big list.- Specified by:
listIteratorin interfaceit.unimi.dsi.fastutil.BigList<Short>- Specified by:
listIteratorin interfaceShortBigList- See Also:
-
listIterator
public it.unimi.dsi.fastutil.shorts.ShortBigListIterator listIterator(long i) Description copied from interface:ShortBigListReturns a type-specific list iterator on this type-specific big list starting at a given index.- Specified by:
listIteratorin interfaceit.unimi.dsi.fastutil.BigList<Short>- Specified by:
listIteratorin interfaceShortBigList- See Also:
-
subList
Description copied from interface:ShortBigListReturns 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<Short>- Specified by:
subListin interfaceShortBigList- See Also:
-
equals
- Specified by:
equalsin interfaceCollection<Short>
-
hashCode
public int hashCode()- Specified by:
hashCodein interfaceCollection<Short>
-
compareTo
- Specified by:
compareToin interfaceComparable<it.unimi.dsi.fastutil.BigList<? extends Short>>
-
addAll
public boolean addAll(long index, it.unimi.dsi.fastutil.shorts.ShortCollection c) Description copied from interface:ShortBigListInserts all of the elements in the specified type-specific collection into this type-specific big list at the specified position (optional operation).- Specified by:
addAllin interfaceShortBigList- See Also:
-
addAll
Description copied from interface:ShortBigListInserts all of the elements in the specified type-specific big list into this type-specific big list at the specified position (optional operation).- Specified by:
addAllin interfaceShortBigList- See Also:
-
addAll
Description copied from interface:ShortBigListAppends all of the elements in the specified type-specific big list to the end of this type-specific big list (optional operation).- Specified by:
addAllin interfaceShortBigList- See Also:
-
add
Deprecated.Please use the corresponding type-specific method instead.- Specified by:
addin interfaceit.unimi.dsi.fastutil.BigList<Short>- Specified by:
addin interfaceShortBigList
-
get
Deprecated.Please use the corresponding type-specific method instead.- Specified by:
getin interfaceit.unimi.dsi.fastutil.BigList<Short>- Specified by:
getin interfaceShortBigList
-
set
Deprecated.Please use the corresponding type-specific method instead.- Specified by:
setin interfaceit.unimi.dsi.fastutil.BigList<Short>- Specified by:
setin interfaceShortBigList
-
remove
Deprecated.Please use the corresponding type-specific method instead.- Specified by:
removein interfaceit.unimi.dsi.fastutil.BigList<Short>- Specified by:
removein interfaceShortBigList
-
indexOf
Deprecated.Please use the corresponding type-specific method instead.- Specified by:
indexOfin interfaceit.unimi.dsi.fastutil.BigList<Short>- Specified by:
indexOfin interfaceShortBigList
-
lastIndexOf
Deprecated.Please use the corresponding type-specific method instead.- Specified by:
lastIndexOfin interfaceit.unimi.dsi.fastutil.BigList<Short>- Specified by:
lastIndexOfin interfaceShortBigList
-
add
public boolean add(short arg0) - Specified by:
addin interfaceit.unimi.dsi.fastutil.shorts.ShortCollection
-
contains
public boolean contains(short arg0) - Specified by:
containsin interfaceit.unimi.dsi.fastutil.shorts.ShortCollection
-
rem
public boolean rem(short arg0) - Specified by:
remin interfaceit.unimi.dsi.fastutil.shorts.ShortCollection
-
size
public int size()- Specified by:
sizein interfaceCollection<Short>
-
isEmpty
public boolean isEmpty()- Specified by:
isEmptyin interfaceCollection<Short>
-
toShortArray
public short[] toShortArray()- Specified by:
toShortArrayin interfaceit.unimi.dsi.fastutil.shorts.ShortCollection
-
toArray
- Specified by:
toArrayin interfaceCollection<Short>
-
toShortArray
Deprecated.- Specified by:
toShortArrayin interfaceit.unimi.dsi.fastutil.shorts.ShortCollection
-
toArray
public short[] toArray(short[] arg0) - Specified by:
toArrayin interfaceit.unimi.dsi.fastutil.shorts.ShortCollection
-
addAll
public boolean addAll(it.unimi.dsi.fastutil.shorts.ShortCollection arg0) - Specified by:
addAllin interfaceit.unimi.dsi.fastutil.shorts.ShortCollection
-
containsAll
public boolean containsAll(it.unimi.dsi.fastutil.shorts.ShortCollection arg0) - Specified by:
containsAllin interfaceit.unimi.dsi.fastutil.shorts.ShortCollection
-
removeAll
public boolean removeAll(it.unimi.dsi.fastutil.shorts.ShortCollection arg0) - Specified by:
removeAllin interfaceit.unimi.dsi.fastutil.shorts.ShortCollection
-
retainAll
public boolean retainAll(it.unimi.dsi.fastutil.shorts.ShortCollection arg0) - Specified by:
retainAllin interfaceit.unimi.dsi.fastutil.shorts.ShortCollection
-
add
Deprecated.- Specified by:
addin interfaceCollection<Short>- Specified by:
addin interfaceit.unimi.dsi.fastutil.shorts.ShortCollection
-
contains
Deprecated.- Specified by:
containsin interfaceCollection<Short>- Specified by:
containsin interfaceit.unimi.dsi.fastutil.shorts.ShortCollection
-
remove
Deprecated.- Specified by:
removein interfaceCollection<Short>- Specified by:
removein interfaceit.unimi.dsi.fastutil.shorts.ShortCollection
-
intIterator
public it.unimi.dsi.fastutil.ints.IntIterator intIterator()- Specified by:
intIteratorin interfaceit.unimi.dsi.fastutil.shorts.ShortCollection- Specified by:
intIteratorin interfaceit.unimi.dsi.fastutil.shorts.ShortIterable
-
intSpliterator
public it.unimi.dsi.fastutil.ints.IntSpliterator intSpliterator()- Specified by:
intSpliteratorin interfaceit.unimi.dsi.fastutil.shorts.ShortCollection- Specified by:
intSpliteratorin interfaceit.unimi.dsi.fastutil.shorts.ShortIterable
-
intStream
- Specified by:
intStreamin interfaceit.unimi.dsi.fastutil.shorts.ShortCollection
-
intParallelStream
- Specified by:
intParallelStreamin interfaceit.unimi.dsi.fastutil.shorts.ShortCollection
-
toArray
public <T> T[] toArray(T[] arg0) - Specified by:
toArrayin interfaceCollection<Short>
-
spliterator
public it.unimi.dsi.fastutil.shorts.ShortSpliterator spliterator()- Specified by:
spliteratorin interfaceCollection<Short>- Specified by:
spliteratorin interfaceIterable<Short>- Specified by:
spliteratorin interfaceit.unimi.dsi.fastutil.shorts.ShortCollection- Specified by:
spliteratorin interfaceit.unimi.dsi.fastutil.shorts.ShortIterable
-
stream
Deprecated.- Specified by:
streamin interfaceCollection<Short>- Specified by:
streamin interfaceit.unimi.dsi.fastutil.shorts.ShortCollection
-
parallelStream
Deprecated.- Specified by:
parallelStreamin interfaceCollection<Short>- Specified by:
parallelStreamin interfaceit.unimi.dsi.fastutil.shorts.ShortCollection
-
forEach
public void forEach(it.unimi.dsi.fastutil.shorts.ShortConsumer arg0) - Specified by:
forEachin interfaceit.unimi.dsi.fastutil.shorts.ShortIterable
-
addAll
- Specified by:
addAllin interfaceCollection<Short>
-
containsAll
- Specified by:
containsAllin interfaceCollection<Short>
-
removeAll
- Specified by:
removeAllin interfaceCollection<Short>
-
retainAll
- Specified by:
retainAllin interfaceCollection<Short>
-
removeIf
public boolean removeIf(it.unimi.dsi.fastutil.shorts.ShortPredicate arg0) - Specified by:
removeIfin interfaceit.unimi.dsi.fastutil.shorts.ShortCollection
-
clear
public void clear()- Specified by:
clearin interfaceCollection<Short>
-
toString
-