Class SynchronizedByteSet
java.lang.Object
org.eclipse.collections.impl.collection.mutable.primitive.AbstractSynchronizedByteCollection
org.eclipse.collections.impl.set.mutable.primitive.SynchronizedByteSet
- All Implemented Interfaces:
Serializable,ByteIterable,MutableByteCollection,PrimitiveIterable,ByteSet,MutableByteSet
public class SynchronizedByteSet extends AbstractSynchronizedByteCollection implements MutableByteSet
A synchronized view of a
MutableByteSet. It is imperative that the user manually synchronize on the collection when iterating over it using the
ByteIterator, as per Collections.synchronizedCollection(Collection).
This file was automatically generated from template file synchronizedPrimitiveSet.stg.
- Since:
- 3.1.
- See Also:
MutableByteSet.asSynchronized(),MutableSet.asSynchronized(), Serialized Form
-
Constructor Summary
Constructors Constructor Description SynchronizedByteSet(MutableByteSet set)SynchronizedByteSet(MutableByteSet set, Object newLock) -
Method Summary
Modifier and Type Method Description LazyByteIterableasLazy()Returns a LazyByteIterable adapter wrapping the source ByteIterable.MutableByteSetasSynchronized()MutableByteSetasUnmodifiable()<V> MutableSet<V>collect(ByteToObjectFunction<? extends V> function)Returns a new collection with the results of applying the specified function on each element of the source collection.booleanequals(Object otherSet)Follows the same general contract asSet.equals(Object).ByteSetfreeze()Returns a frozen copy of this set.inthashCode()Follows the same general contract asSet.hashCode().MutableByteSetnewEmpty()Creates a new empty mutable version of the same Set type.static SynchronizedByteSetof(MutableByteSet set)This method will take a MutableByteSet and wrap it directly in a SynchronizedByteSet.static SynchronizedByteSetof(MutableByteSet set, Object lock)This method will take a MutableByteSet and wrap it directly in a SynchronizedByteSet.MutableByteSetreject(BytePredicate predicate)Returns a new ByteIterable with all of the elements in the ByteIterable that return false for the specified predicate.MutableByteSetselect(BytePredicate predicate)Returns a new ByteIterable with all of the elements in the ByteIterable that return true for the specified predicate.ImmutableByteSettoImmutable()Returns an immutable copy of this set.SynchronizedByteSetwith(byte element)SynchronizedByteSetwithAll(ByteIterable elements)SynchronizedByteSetwithout(byte element)SynchronizedByteSetwithoutAll(ByteIterable elements)Methods inherited from class org.eclipse.collections.impl.collection.mutable.primitive.AbstractSynchronizedByteCollection
add, addAll, addAll, allSatisfy, anySatisfy, appendString, appendString, appendString, average, byteIterator, chunk, clear, contains, containsAll, containsAll, count, detectIfNone, each, forEach, injectInto, isEmpty, makeString, makeString, makeString, max, maxIfEmpty, median, min, minIfEmpty, noneSatisfy, notEmpty, reduce, reduceIfEmpty, remove, removeAll, removeAll, removeIf, retainAll, retainAll, size, sum, toArray, toArray, toBag, toList, toSet, toSortedArray, toSortedList, toStringMethods inherited from interface org.eclipse.collections.api.ByteIterable
allSatisfy, anySatisfy, average, averageIfEmpty, chunk, collect, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectInt, collectLong, collectShort, contains, containsAll, containsAll, count, detectIfNone, each, flatCollect, forEach, injectInto, max, maxIfEmpty, median, medianIfEmpty, min, minIfEmpty, noneSatisfy, reduce, reduceIfEmpty, reject, select, sum, summaryStatistics, toArray, toArray, toBag, toList, toSet, toSortedArray, toSortedListMethods inherited from interface org.eclipse.collections.api.collection.primitive.MutableByteCollection
add, addAll, addAll, byteIterator, clear, remove, removeAll, removeAll, removeIf, retainAll, retainAllMethods inherited from interface org.eclipse.collections.api.PrimitiveIterable
appendString, appendString, appendString, isEmpty, makeString, makeString, makeString, notEmpty, size, toString
-
Constructor Details
-
Method Details
-
of
This method will take a MutableByteSet and wrap it directly in a SynchronizedByteSet. -
of
This method will take a MutableByteSet and wrap it directly in a SynchronizedByteSet. Additionally, a developer specifies which lock to use with the collection. -
without
- Specified by:
withoutin interfaceMutableByteCollection- Specified by:
withoutin interfaceMutableByteSet- Overrides:
withoutin classAbstractSynchronizedByteCollection
-
with
- Specified by:
within interfaceMutableByteCollection- Specified by:
within interfaceMutableByteSet- Overrides:
within classAbstractSynchronizedByteCollection
-
withAll
- Specified by:
withAllin interfaceMutableByteCollection- Specified by:
withAllin interfaceMutableByteSet- Overrides:
withAllin classAbstractSynchronizedByteCollection
-
withoutAll
- Specified by:
withoutAllin interfaceMutableByteCollection- Specified by:
withoutAllin interfaceMutableByteSet- Overrides:
withoutAllin classAbstractSynchronizedByteCollection
-
select
Description copied from interface:ByteIterableReturns a new ByteIterable with all of the elements in the ByteIterable that return true for the specified predicate.- Specified by:
selectin interfaceByteIterable- Specified by:
selectin interfaceByteSet- Specified by:
selectin interfaceMutableByteCollection- Specified by:
selectin interfaceMutableByteSet- Overrides:
selectin classAbstractSynchronizedByteCollection
-
reject
Description copied from interface:ByteIterableReturns a new ByteIterable with all of the elements in the ByteIterable that return false for the specified predicate.- Specified by:
rejectin interfaceByteIterable- Specified by:
rejectin interfaceByteSet- Specified by:
rejectin interfaceMutableByteCollection- Specified by:
rejectin interfaceMutableByteSet- Overrides:
rejectin classAbstractSynchronizedByteCollection
-
collect
Description copied from interface:ByteIterableReturns a new collection with the results of applying the specified function on each element of the source collection. This method is also commonly called transform or map.- Specified by:
collectin interfaceByteIterable- Specified by:
collectin interfaceByteSet- Specified by:
collectin interfaceMutableByteCollection- Specified by:
collectin interfaceMutableByteSet- Overrides:
collectin classAbstractSynchronizedByteCollection
-
equals
Description copied from interface:ByteSetFollows the same general contract asSet.equals(Object). -
hashCode
public int hashCode()Description copied from interface:ByteSetFollows the same general contract asSet.hashCode(). -
asLazy
Description copied from interface:ByteIterableReturns a LazyByteIterable adapter wrapping the source ByteIterable.- Specified by:
asLazyin interfaceByteIterable- Overrides:
asLazyin classAbstractSynchronizedByteCollection
-
asUnmodifiable
- Specified by:
asUnmodifiablein interfaceMutableByteCollection- Specified by:
asUnmodifiablein interfaceMutableByteSet- Overrides:
asUnmodifiablein classAbstractSynchronizedByteCollection
-
asSynchronized
- Specified by:
asSynchronizedin interfaceMutableByteCollection- Specified by:
asSynchronizedin interfaceMutableByteSet- Overrides:
asSynchronizedin classAbstractSynchronizedByteCollection
-
freeze
Description copied from interface:MutableByteSetReturns a frozen copy of this set. A frozen copy is the same thing as an immutable copy without safe-publish guarantees.- Specified by:
freezein interfaceByteSet- Specified by:
freezein interfaceMutableByteSet
-
toImmutable
Description copied from interface:MutableByteSetReturns an immutable copy of this set.- Specified by:
toImmutablein interfaceByteSet- Specified by:
toImmutablein interfaceMutableByteCollection- Specified by:
toImmutablein interfaceMutableByteSet- Overrides:
toImmutablein classAbstractSynchronizedByteCollection
-
newEmpty
Description copied from interface:MutableByteSetCreates a new empty mutable version of the same Set type.- Specified by:
newEmptyin interfaceMutableByteCollection- Specified by:
newEmptyin interfaceMutableByteSet- Since:
- 9.2.
-