Class ByteLists.UnmodifiableRandomAccessList
- All Implemented Interfaces:
ByteCollection,ByteIterable,ByteList,Serializable,Comparable<List<? extends Byte>>,Iterable<Byte>,Collection<Byte>,List<Byte>,RandomAccess
- Enclosing class:
- ByteLists
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionbooleanadd(byte k) Ensures that this collection contains the specified element (optional operation).booleanDeprecated.booleanAdds all elements of the given type-specific collection to this collection.booleanaddAll(Collection<? extends Byte> c) voidclear()booleancontains(byte o) Returnstrueif this collection contains the specified element.booleanDeprecated.booleanChecks whether this collection contains all elements from the given type-specific collection.booleancontainsAll(Collection<?> c) voidforEach(ByteConsumer action) Performs the given action for each element of this type-specificIterableuntil all elements have been processed or the action throws an exception.Returns a widened primitive iterator on the elements of this collection.Return a parallel primitive stream over the elements, performing widening casts if needed.Returns widened primitive spliterator on the elements of this collection.Return a primitive stream over the elements, performing widening casts if needed.booleanisEmpty()Deprecated.booleanrem(byte k) Removes a single instance of the specified element from this collection, if it is present (optional operation).booleanDeprecated.booleanRemove from this collection all elements in the given type-specific collection.booleanremoveAll(Collection<?> c) booleanremoveIf(BytePredicate filter) Remove from this collection all elements which satisfy the given predicate.booleanRetains in this collection only elements from the given type-specific collection.booleanretainAll(Collection<?> c) intsize()Returns a type-specific spliterator on the elements of this collection.stream()Deprecated.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()byte[]toArray(byte[] a) Returns an array containing all of the elements in this collection; the runtime type of the returned array is that of the specified array.<T> T[]toArray(T[] a) byte[]Returns a primitive type array containing the items of this collection.byte[]toByteArray(byte[] a) Deprecated.toString()Methods inherited from class it.unimi.dsi.fastutil.bytes.ByteLists.UnmodifiableList
add, add, addAll, addAll, addAll, addAll, addElements, addElements, compareTo, equals, get, getByte, getElements, hashCode, indexOf, indexOf, iterator, lastIndexOf, lastIndexOf, listIterator, listIterator, remove, removeByte, removeElements, replaceAll, replaceAll, set, set, setElements, setElements, setElements, size, sort, sort, unstableSort, unstableSortMethods inherited from interface it.unimi.dsi.fastutil.bytes.ByteCollection
addAll, contains, containsAll, intIterator, intParallelStream, intSpliterator, intStream, parallelStream, rem, removeAll, removeIf, removeIf, removeIf, retainAll, stream, toArray, toByteArray, toByteArrayMethods inherited from interface it.unimi.dsi.fastutil.bytes.ByteIterable
forEach, forEach, forEachMethods inherited from interface it.unimi.dsi.fastutil.bytes.ByteList
add, add, contains, remove, replaceAll, spliteratorMethods inherited from interface java.util.Collection
toArray
-
Method Details
-
subList
Description copied from interface:ByteListReturns a type-specific view of the portion of this list from the indexfrom, inclusive, to the indexto, exclusive. -
add
public boolean add(byte k) Description copied from interface:ByteCollectionEnsures that this collection contains the specified element (optional operation).- Specified by:
addin interfaceByteCollection- See Also:
-
rem
public boolean rem(byte k) Description copied from interface:ByteCollectionRemoves a single instance of the specified element from this collection, if it is present (optional operation).Note that this method should be called
remove(), but the clash with the similarly named index-based method in theListinterface forces us to use a distinguished name. For simplicity, the set interfaces reinstatesremove().- Specified by:
remin interfaceByteCollection- See Also:
-
size
public int size()- Specified by:
sizein interfaceCollection<Byte>
-
isEmpty
public boolean isEmpty()- Specified by:
isEmptyin interfaceCollection<Byte>
-
contains
public boolean contains(byte o) Description copied from interface:ByteCollectionReturnstrueif this collection contains the specified element.- Specified by:
containsin interfaceByteCollection- See Also:
-
spliterator
Description copied from interface:ByteCollectionReturns 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 interfaceByteCollection- Specified by:
spliteratorin interfaceByteIterable- Specified by:
spliteratorin interfaceCollection<Byte>- Specified by:
spliteratorin interfaceIterable<Byte>- Returns:
- a type-specific spliterator on the elements of this collection.
-
stream
Deprecated.Description copied from interface:ByteCollection- Specified by:
streamin interfaceByteCollection- Specified by:
streamin interfaceCollection<Byte>
-
parallelStream
Deprecated.Description copied from interface:ByteCollection- Specified by:
parallelStreamin interfaceByteCollection- Specified by:
parallelStreamin interfaceCollection<Byte>
-
clear
public void clear()- Specified by:
clearin interfaceCollection<Byte>
-
toArray
public <T> T[] toArray(T[] a) - Specified by:
toArrayin interfaceCollection<Byte>
-
toArray
- Specified by:
toArrayin interfaceCollection<Byte>
-
forEach
Description copied from interface:ByteIterablePerforms the given action for each element of this type-specificIterableuntil all elements have been processed or the action throws an exception.- Specified by:
forEachin interfaceByteIterable- Parameters:
action- the action to be performed for each element.- See Also:
-
containsAll
- Specified by:
containsAllin interfaceCollection<Byte>
-
addAll
- Specified by:
addAllin interfaceCollection<Byte>
-
removeAll
- Specified by:
removeAllin interfaceCollection<Byte>
-
retainAll
- Specified by:
retainAllin interfaceCollection<Byte>
-
removeIf
Description copied from interface:ByteCollectionRemove from this collection all elements which satisfy the given predicate.- Specified by:
removeIfin interfaceByteCollection- Parameters:
filter- a predicate which returnstruefor elements to be removed.- Returns:
trueif any elements were removed.- See Also:
-
add
Deprecated.Description copied from interface:ByteCollection- Specified by:
addin interfaceByteCollection- Specified by:
addin interfaceCollection<Byte>
-
contains
Deprecated.Description copied from interface:ByteCollection- Specified by:
containsin interfaceByteCollection- Specified by:
containsin interfaceCollection<Byte>
-
remove
Deprecated.Description copied from interface:ByteCollection- Specified by:
removein interfaceByteCollection- Specified by:
removein interfaceCollection<Byte>
-
toByteArray
public byte[] toByteArray()Description copied from interface:ByteCollectionReturns a primitive type array containing the items of this collection.- Specified by:
toByteArrayin interfaceByteCollection- Returns:
- a primitive type array containing the items of this collection.
- See Also:
-
toByteArray
Deprecated.Description copied from interface:ByteCollectionReturns a primitive type array containing the items of this collection.Note that, contrarily to
Collection.toArray(Object[]), this methods just writes all elements of this collection: no special value will be added after the last one.- Specified by:
toByteArrayin interfaceByteCollection- Parameters:
a- if this array is big enough, it will be used to store this collection.- Returns:
- a primitive type array containing the items of this collection.
- See Also:
-
toArray
public byte[] toArray(byte[] a) Description copied from interface:ByteCollectionReturns an array containing all of the elements in this collection; the runtime type of the returned array is that of the specified array.Note that, contrarily to
Collection.toArray(Object[]), this methods just writes all elements of this collection: no special value will be added after the last one.- Specified by:
toArrayin interfaceByteCollection- Parameters:
a- if this array is big enough, it will be used to store this collection.- Returns:
- a primitive type array containing the items of this collection.
- See Also:
-
containsAll
Description copied from interface:ByteCollectionChecks whether this collection contains all elements from the given type-specific collection.- Specified by:
containsAllin interfaceByteCollection- Parameters:
c- a type-specific collection.- Returns:
trueif this collection contains all elements of the argument.- See Also:
-
addAll
Description copied from interface:ByteCollectionAdds all elements of the given type-specific collection to this collection.- Specified by:
addAllin interfaceByteCollection- Parameters:
c- a type-specific collection.- Returns:
trueif this collection changed as a result of the call.- See Also:
-
removeAll
Description copied from interface:ByteCollectionRemove from this collection all elements in the given type-specific collection.- Specified by:
removeAllin interfaceByteCollection- Parameters:
c- a type-specific collection.- Returns:
trueif this collection changed as a result of the call.- See Also:
-
retainAll
Description copied from interface:ByteCollectionRetains in this collection only elements from the given type-specific collection.- Specified by:
retainAllin interfaceByteCollection- Parameters:
c- a type-specific collection.- Returns:
trueif this collection changed as a result of the call.- See Also:
-
intIterator
Description copied from interface:ByteCollectionReturns a widened primitive iterator on the elements of this collection.This method is provided for the purpose of APIs that expect only the JDK's primitive iterators, of which there are only
int,long, anddouble.- Specified by:
intIteratorin interfaceByteCollection- Specified by:
intIteratorin interfaceByteIterable- Returns:
- a widened primitive iterator on the elements of this collection.
-
intSpliterator
Description copied from interface:ByteCollectionReturns widened primitive spliterator on the elements of this collection.This method is provided for the purpose of APIs that expect only the JDK's primitive spliterators, of which there are only
int,long, anddouble.- Specified by:
intSpliteratorin interfaceByteCollection- Specified by:
intSpliteratorin interfaceByteIterable- Returns:
- a widened primitive spliterator on the elements of this collection.
-
intStream
Description copied from interface:ByteCollectionReturn a primitive stream over the elements, performing widening casts if needed.- Specified by:
intStreamin interfaceByteCollection- Returns:
- a primitive stream over the elements.
- See Also:
-
intParallelStream
Description copied from interface:ByteCollectionReturn a parallel primitive stream over the elements, performing widening casts if needed.- Specified by:
intParallelStreamin interfaceByteCollection- Returns:
- a parallel primitive stream over the elements.
- See Also:
-
toString
-