Class SynchronizedBooleanSet
java.lang.Object
org.eclipse.collections.impl.collection.mutable.primitive.AbstractSynchronizedBooleanCollection
org.eclipse.collections.impl.set.mutable.primitive.SynchronizedBooleanSet
- All Implemented Interfaces:
Serializable
,BooleanIterable
,MutableBooleanCollection
,PrimitiveIterable
,BooleanSet
,MutableBooleanSet
public class SynchronizedBooleanSet extends AbstractSynchronizedBooleanCollection implements MutableBooleanSet
A synchronized view of a
MutableBooleanSet
. It is imperative that the user manually synchronize on the collection when iterating over it using the
BooleanIterator
, as per Collections.synchronizedCollection(Collection)
.
This file was automatically generated from template file synchronizedPrimitiveSet.stg.
- Since:
- 3.1.
- See Also:
MutableBooleanSet.asSynchronized()
,MutableSet.asSynchronized()
, Serialized Form
-
Constructor Summary
Constructors Constructor Description SynchronizedBooleanSet(MutableBooleanSet set)
SynchronizedBooleanSet(MutableBooleanSet set, Object newLock)
-
Method Summary
Modifier and Type Method Description LazyBooleanIterable
asLazy()
Returns a LazyBooleanIterable adapter wrapping the source BooleanIterable.MutableBooleanSet
asSynchronized()
MutableBooleanSet
asUnmodifiable()
<V> MutableSet<V>
collect(BooleanToObjectFunction<? extends V> function)
Returns a new collection with the results of applying the specified function on each element of the source collection.boolean
equals(Object otherSet)
Follows the same general contract asSet.equals(Object)
.BooleanSet
freeze()
Returns a frozen copy of this set.int
hashCode()
Follows the same general contract asSet.hashCode()
.MutableBooleanSet
newEmpty()
Creates a new empty mutable version of the same Set type.static SynchronizedBooleanSet
of(MutableBooleanSet set)
This method will take a MutableBooleanSet and wrap it directly in a SynchronizedBooleanSet.static SynchronizedBooleanSet
of(MutableBooleanSet set, Object lock)
This method will take a MutableBooleanSet and wrap it directly in a SynchronizedBooleanSet.MutableBooleanSet
reject(BooleanPredicate predicate)
Returns a new BooleanIterable with all of the elements in the BooleanIterable that return false for the specified predicate.MutableBooleanSet
select(BooleanPredicate predicate)
Returns a new BooleanIterable with all of the elements in the BooleanIterable that return true for the specified predicate.ImmutableBooleanSet
toImmutable()
Returns an immutable copy of this set.SynchronizedBooleanSet
with(boolean element)
SynchronizedBooleanSet
withAll(BooleanIterable elements)
SynchronizedBooleanSet
without(boolean element)
SynchronizedBooleanSet
withoutAll(BooleanIterable elements)
Methods inherited from class org.eclipse.collections.impl.collection.mutable.primitive.AbstractSynchronizedBooleanCollection
add, addAll, addAll, allSatisfy, anySatisfy, appendString, appendString, appendString, booleanIterator, chunk, clear, contains, containsAll, containsAll, count, detectIfNone, each, forEach, injectInto, isEmpty, makeString, makeString, makeString, noneSatisfy, notEmpty, reduce, reduceIfEmpty, remove, removeAll, removeAll, removeIf, retainAll, retainAll, size, toArray, toArray, toBag, toList, toSet, toString
Methods inherited from interface org.eclipse.collections.api.BooleanIterable
allSatisfy, anySatisfy, chunk, collect, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectInt, collectLong, collectShort, contains, containsAll, containsAll, count, detectIfNone, each, flatCollect, forEach, injectInto, noneSatisfy, reduce, reduceIfEmpty, reject, select, toArray, toArray, toBag, toList, toSet
Methods inherited from interface org.eclipse.collections.api.collection.primitive.MutableBooleanCollection
add, addAll, addAll, booleanIterator, clear, remove, removeAll, removeAll, removeIf, retainAll, retainAll
Methods 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 MutableBooleanSet and wrap it directly in a SynchronizedBooleanSet. -
of
This method will take a MutableBooleanSet and wrap it directly in a SynchronizedBooleanSet. Additionally, a developer specifies which lock to use with the collection. -
without
- Specified by:
without
in interfaceMutableBooleanCollection
- Specified by:
without
in interfaceMutableBooleanSet
- Overrides:
without
in classAbstractSynchronizedBooleanCollection
-
with
- Specified by:
with
in interfaceMutableBooleanCollection
- Specified by:
with
in interfaceMutableBooleanSet
- Overrides:
with
in classAbstractSynchronizedBooleanCollection
-
withAll
- Specified by:
withAll
in interfaceMutableBooleanCollection
- Specified by:
withAll
in interfaceMutableBooleanSet
- Overrides:
withAll
in classAbstractSynchronizedBooleanCollection
-
withoutAll
- Specified by:
withoutAll
in interfaceMutableBooleanCollection
- Specified by:
withoutAll
in interfaceMutableBooleanSet
- Overrides:
withoutAll
in classAbstractSynchronizedBooleanCollection
-
select
Description copied from interface:BooleanIterable
Returns a new BooleanIterable with all of the elements in the BooleanIterable that return true for the specified predicate.- Specified by:
select
in interfaceBooleanIterable
- Specified by:
select
in interfaceBooleanSet
- Specified by:
select
in interfaceMutableBooleanCollection
- Specified by:
select
in interfaceMutableBooleanSet
- Overrides:
select
in classAbstractSynchronizedBooleanCollection
-
reject
Description copied from interface:BooleanIterable
Returns a new BooleanIterable with all of the elements in the BooleanIterable that return false for the specified predicate.- Specified by:
reject
in interfaceBooleanIterable
- Specified by:
reject
in interfaceBooleanSet
- Specified by:
reject
in interfaceMutableBooleanCollection
- Specified by:
reject
in interfaceMutableBooleanSet
- Overrides:
reject
in classAbstractSynchronizedBooleanCollection
-
collect
Description copied from interface:BooleanIterable
Returns 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:
collect
in interfaceBooleanIterable
- Specified by:
collect
in interfaceBooleanSet
- Specified by:
collect
in interfaceMutableBooleanCollection
- Specified by:
collect
in interfaceMutableBooleanSet
- Overrides:
collect
in classAbstractSynchronizedBooleanCollection
-
equals
Description copied from interface:BooleanSet
Follows the same general contract asSet.equals(Object)
.- Specified by:
equals
in interfaceBooleanSet
- Overrides:
equals
in classObject
-
hashCode
public int hashCode()Description copied from interface:BooleanSet
Follows the same general contract asSet.hashCode()
.- Specified by:
hashCode
in interfaceBooleanSet
- Overrides:
hashCode
in classObject
-
asLazy
Description copied from interface:BooleanIterable
Returns a LazyBooleanIterable adapter wrapping the source BooleanIterable.- Specified by:
asLazy
in interfaceBooleanIterable
- Overrides:
asLazy
in classAbstractSynchronizedBooleanCollection
-
asUnmodifiable
- Specified by:
asUnmodifiable
in interfaceMutableBooleanCollection
- Specified by:
asUnmodifiable
in interfaceMutableBooleanSet
- Overrides:
asUnmodifiable
in classAbstractSynchronizedBooleanCollection
-
asSynchronized
- Specified by:
asSynchronized
in interfaceMutableBooleanCollection
- Specified by:
asSynchronized
in interfaceMutableBooleanSet
- Overrides:
asSynchronized
in classAbstractSynchronizedBooleanCollection
-
freeze
Description copied from interface:MutableBooleanSet
Returns a frozen copy of this set. A frozen copy is the same thing as an immutable copy without safe-publish guarantees.- Specified by:
freeze
in interfaceBooleanSet
- Specified by:
freeze
in interfaceMutableBooleanSet
-
toImmutable
Description copied from interface:MutableBooleanSet
Returns an immutable copy of this set.- Specified by:
toImmutable
in interfaceBooleanSet
- Specified by:
toImmutable
in interfaceMutableBooleanCollection
- Specified by:
toImmutable
in interfaceMutableBooleanSet
- Overrides:
toImmutable
in classAbstractSynchronizedBooleanCollection
-
newEmpty
Description copied from interface:MutableBooleanSet
Creates a new empty mutable version of the same Set type.- Specified by:
newEmpty
in interfaceMutableBooleanCollection
- Specified by:
newEmpty
in interfaceMutableBooleanSet
- Since:
- 9.2.
-