Class ByteSortedSets.SynchronizedSortedSet
- All Implemented Interfaces:
ByteBidirectionalIterable,ByteCollection,ByteIterable,ByteSet,ByteSortedSet,Serializable,Iterable<Byte>,Collection<Byte>,Set<Byte>,SortedSet<Byte>
- Enclosing class:
- ByteSortedSets
- 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 k) Returnstrueif this collection contains the specified element.booleanDeprecated.booleanChecks whether this collection contains all elements from the given type-specific collection.booleancontainsAll(Collection<?> c) booleanfirst()Deprecated.Please use the corresponding type-specific method instead.byteReturns the first (lowest) element currently in this set.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.inthashCode()headSet(byte to) Returns a view of the portion of this sorted set whose elements are strictly less thantoElement.Deprecated.Please use the corresponding type-specific method instead.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()iterator()Returns a type-specific iterator on the elements of this collection.iterator(byte from) Returns a type-specificBidirectionalIteratoron the elements in this set, starting from a given element of the domain (optional operation).last()Deprecated.Please use the corresponding type-specific method instead.bytelastByte()Returns the last (highest) element currently in this set.Deprecated.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.subSet(byte from, byte to) Returns a view of the portion of this sorted set whose elements range fromfromElement, inclusive, totoElement, exclusive.Deprecated.Please use the corresponding type-specific method instead.tailSet(byte from) Returns a view of the portion of this sorted set whose elements are greater than or equal tofromElement.Deprecated.Please use the corresponding type-specific method instead.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.ByteSets.SynchronizedSet
rem, removeMethods inherited from interface it.unimi.dsi.fastutil.bytes.ByteCollection
add, addAll, contains, containsAll, intIterator, intParallelStream, intSpliterator, intStream, parallelStream, 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.ByteSet
add, contains, rem, remove, removeMethods inherited from interface it.unimi.dsi.fastutil.bytes.ByteSortedSet
spliteratorMethods inherited from interface java.util.Collection
toArray
-
Method Details
-
comparator
Description copied from interface:ByteSortedSet- Specified by:
comparatorin interfaceByteSortedSet- Specified by:
comparatorin interfaceSortedSet<Byte>
-
subSet
Description copied from interface:ByteSortedSetReturns a view of the portion of this sorted set whose elements range fromfromElement, inclusive, totoElement, exclusive.- Specified by:
subSetin interfaceByteSortedSet- See Also:
-
headSet
Description copied from interface:ByteSortedSetReturns a view of the portion of this sorted set whose elements are strictly less thantoElement.- Specified by:
headSetin interfaceByteSortedSet- See Also:
-
tailSet
Description copied from interface:ByteSortedSetReturns a view of the portion of this sorted set whose elements are greater than or equal tofromElement.- Specified by:
tailSetin interfaceByteSortedSet- See Also:
-
iterator
Description copied from interface:ByteCollectionReturns a type-specific iterator on the elements of this collection.- Specified by:
iteratorin interfaceByteBidirectionalIterable- Specified by:
iteratorin interfaceByteCollection- Specified by:
iteratorin interfaceByteIterable- Specified by:
iteratorin interfaceByteSet- Specified by:
iteratorin interfaceByteSortedSet- Specified by:
iteratorin interfaceCollection<Byte>- Specified by:
iteratorin interfaceIterable<Byte>- Specified by:
iteratorin interfaceSet<Byte>- Returns:
- a type-specific iterator on the elements of this collection.
- See Also:
-
iterator
Description copied from interface:ByteSortedSetReturns a type-specificBidirectionalIteratoron the elements in this set, starting from a given element of the domain (optional operation).This method returns a type-specific bidirectional iterator with given starting point. The starting point is any element comparable to the elements of this set (even if it does not actually belong to the set). The next element of the returned iterator is the least element of the set that is greater than the starting point (if there are no elements greater than the starting point,
hasNext()will returnfalse). The previous element of the returned iterator is the greatest element of the set that is smaller than or equal to the starting point (if there are no elements smaller than or equal to the starting point,hasPrevious()will returnfalse).Note that passing the last element of the set as starting point and calling
previous()you can traverse the entire set in reverse order.- Specified by:
iteratorin interfaceByteSortedSet- Parameters:
from- an element to start from.- Returns:
- a bidirectional iterator on the element in this set, starting at the given element.
-
firstByte
public byte firstByte()Description copied from interface:ByteSortedSetReturns the first (lowest) element currently in this set.- Specified by:
firstBytein interfaceByteSortedSet- See Also:
-
lastByte
public byte lastByte()Description copied from interface:ByteSortedSetReturns the last (highest) element currently in this set.- Specified by:
lastBytein interfaceByteSortedSet- See Also:
-
first
Deprecated.Please use the corresponding type-specific method instead.- Specified by:
firstin interfaceByteSortedSet- Specified by:
firstin interfaceSortedSet<Byte>
-
last
Deprecated.Please use the corresponding type-specific method instead.- Specified by:
lastin interfaceByteSortedSet- Specified by:
lastin interfaceSortedSet<Byte>
-
subSet
Deprecated.Please use the corresponding type-specific method instead.- Specified by:
subSetin interfaceByteSortedSet- Specified by:
subSetin interfaceSortedSet<Byte>
-
headSet
Deprecated.Please use the corresponding type-specific method instead.- Specified by:
headSetin interfaceByteSortedSet- Specified by:
headSetin interfaceSortedSet<Byte>
-
tailSet
Deprecated.Please use the corresponding type-specific method instead.- Specified by:
tailSetin interfaceByteSortedSet- Specified by:
tailSetin interfaceSortedSet<Byte>
-
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:
-
contains
public boolean contains(byte k) Description copied from interface:ByteCollectionReturnstrueif this collection contains the specified element.- Specified by:
containsin interfaceByteCollection- See Also:
-
size
public int size()- Specified by:
sizein interfaceCollection<Byte>
-
isEmpty
public boolean isEmpty()- Specified by:
isEmptyin 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:
-
toArray
- Specified by:
toArrayin interfaceCollection<Byte>
-
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:
-
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:
-
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:
-
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:
-
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>
-
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:
-
toArray
public <T> T[] toArray(T[] a) - Specified by:
toArrayin interfaceCollection<Byte>
-
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>
-
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:
-
addAll
- Specified by:
addAllin interfaceCollection<Byte>
-
containsAll
- Specified by:
containsAllin 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:
-
clear
public void clear()- Specified by:
clearin interfaceCollection<Byte>
-
toString
-
hashCode
public int hashCode()- Specified by:
hashCodein interfaceCollection<Byte>- Overrides:
hashCodein classObject
-
equals
- Specified by:
equalsin interfaceCollection<Byte>- Overrides:
equalsin classObject
-