Class SynchronizedBooleanSet
- java.lang.Object
-
- org.eclipse.collections.impl.collection.mutable.primitive.AbstractSynchronizedBooleanCollection
-
- org.eclipse.collections.impl.set.mutable.primitive.SynchronizedBooleanSet
-
- All Implemented Interfaces:
java.io.Serializable,BooleanIterable,MutableBooleanCollection,PrimitiveIterable,BooleanSet,MutableBooleanSet
public class SynchronizedBooleanSet extends AbstractSynchronizedBooleanCollection implements MutableBooleanSet
A synchronized view of aMutableBooleanSet. It is imperative that the user manually synchronize on the collection when iterating over it using theBooleanIterator, as perCollections.synchronizedCollection(Collection).This file was automatically generated from template file synchronizedPrimitiveSet.stg.
- Since:
- 3.1.
- See Also:
MutableBooleanSet.asSynchronized(),MutableSet.asSynchronized(), Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private static longserialVersionUID
-
Constructor Summary
Constructors Constructor Description SynchronizedBooleanSet(MutableBooleanSet set)SynchronizedBooleanSet(MutableBooleanSet set, java.lang.Object newLock)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description LazyBooleanIterableasLazy()Returns a LazyBooleanIterable adapter wrapping the source BooleanIterable.MutableBooleanSetasSynchronized()MutableBooleanSetasUnmodifiable()MutableSet<java.lang.Boolean>boxed()LazyIterable<BooleanBooleanPair>cartesianProduct(BooleanSet set)Returns the set whose members are all possible ordered pairs (a, b) where a is a member ofthisand b is a member ofset.<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.booleanequals(java.lang.Object otherSet)Follows the same general contract asSet.equals(Object).BooleanSetfreeze()Returns a frozen copy of this set.private MutableBooleanSetgetMutableBooleanSet()inthashCode()Follows the same general contract asSet.hashCode().MutableBooleanSetnewEmpty()Creates a new empty mutable version of the same Set type.static SynchronizedBooleanSetof(MutableBooleanSet set)This method will take a MutableBooleanSet and wrap it directly in a SynchronizedBooleanSet.static SynchronizedBooleanSetof(MutableBooleanSet set, java.lang.Object lock)This method will take a MutableBooleanSet and wrap it directly in a SynchronizedBooleanSet.MutableBooleanSetreject(BooleanPredicate predicate)Returns a new BooleanIterable with all of the elements in the BooleanIterable that return false for the specified predicate.MutableBooleanSetselect(BooleanPredicate predicate)Returns a new BooleanIterable with all of the elements in the BooleanIterable that return true for the specified predicate.ImmutableBooleanSettoImmutable()Returns an immutable copy of this set.SynchronizedBooleanSetwith(boolean element)SynchronizedBooleanSetwithAll(BooleanIterable elements)SynchronizedBooleanSetwithout(boolean element)SynchronizedBooleanSetwithoutAll(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, containsAny, containsAny, containsNone, containsNone, count, detectIfNone, each, getBooleanCollection, getLock, 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 class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.eclipse.collections.api.BooleanIterable
allSatisfy, anySatisfy, chunk, collect, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectInt, collectLong, collectShort, contains, containsAll, containsAll, containsAny, containsAny, containsNone, containsNone, count, detectIfNone, each, flatCollect, forEach, injectInto, injectIntoBoolean, injectIntoByte, injectIntoChar, injectIntoDouble, injectIntoFloat, injectIntoInt, injectIntoLong, injectIntoShort, noneSatisfy, reduce, reduceIfEmpty, reject, select, toArray, toArray, toBag, toList, toSet
-
Methods inherited from interface org.eclipse.collections.api.set.primitive.BooleanSet
isProperSubsetOf, isSubsetOf
-
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.set.primitive.MutableBooleanSet
difference, intersect, symmetricDifference, tap, union
-
Methods inherited from interface org.eclipse.collections.api.PrimitiveIterable
appendString, appendString, appendString, isEmpty, makeString, makeString, makeString, notEmpty, size, toString
-
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
SynchronizedBooleanSet
public SynchronizedBooleanSet(MutableBooleanSet set)
-
SynchronizedBooleanSet
public SynchronizedBooleanSet(MutableBooleanSet set, java.lang.Object newLock)
-
-
Method Detail
-
of
public static SynchronizedBooleanSet of(MutableBooleanSet set)
This method will take a MutableBooleanSet and wrap it directly in a SynchronizedBooleanSet.
-
of
public static SynchronizedBooleanSet of(MutableBooleanSet set, java.lang.Object lock)
This method will take a MutableBooleanSet and wrap it directly in a SynchronizedBooleanSet. Additionally, a developer specifies which lock to use with the collection.
-
getMutableBooleanSet
private MutableBooleanSet getMutableBooleanSet()
-
without
public SynchronizedBooleanSet without(boolean element)
- Specified by:
withoutin interfaceMutableBooleanCollection- Specified by:
withoutin interfaceMutableBooleanSet- Overrides:
withoutin classAbstractSynchronizedBooleanCollection
-
boxed
public MutableSet<java.lang.Boolean> boxed()
- Specified by:
boxedin interfaceMutableBooleanSet
-
with
public SynchronizedBooleanSet with(boolean element)
- Specified by:
within interfaceMutableBooleanCollection- Specified by:
within interfaceMutableBooleanSet- Overrides:
within classAbstractSynchronizedBooleanCollection
-
withAll
public SynchronizedBooleanSet withAll(BooleanIterable elements)
- Specified by:
withAllin interfaceMutableBooleanCollection- Specified by:
withAllin interfaceMutableBooleanSet- Overrides:
withAllin classAbstractSynchronizedBooleanCollection
-
withoutAll
public SynchronizedBooleanSet withoutAll(BooleanIterable elements)
- Specified by:
withoutAllin interfaceMutableBooleanCollection- Specified by:
withoutAllin interfaceMutableBooleanSet- Overrides:
withoutAllin classAbstractSynchronizedBooleanCollection
-
select
public MutableBooleanSet select(BooleanPredicate predicate)
Description copied from interface:BooleanIterableReturns a new BooleanIterable with all of the elements in the BooleanIterable that return true for the specified predicate.- Specified by:
selectin interfaceBooleanIterable- Specified by:
selectin interfaceBooleanSet- Specified by:
selectin interfaceMutableBooleanCollection- Specified by:
selectin interfaceMutableBooleanSet- Overrides:
selectin classAbstractSynchronizedBooleanCollection
-
reject
public MutableBooleanSet reject(BooleanPredicate predicate)
Description copied from interface:BooleanIterableReturns a new BooleanIterable with all of the elements in the BooleanIterable that return false for the specified predicate.- Specified by:
rejectin interfaceBooleanIterable- Specified by:
rejectin interfaceBooleanSet- Specified by:
rejectin interfaceMutableBooleanCollection- Specified by:
rejectin interfaceMutableBooleanSet- Overrides:
rejectin classAbstractSynchronizedBooleanCollection
-
collect
public <V> MutableSet<V> collect(BooleanToObjectFunction<? extends V> function)
Description copied from interface:BooleanIterableReturns 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 interfaceBooleanIterable- Specified by:
collectin interfaceBooleanSet- Specified by:
collectin interfaceMutableBooleanCollection- Specified by:
collectin interfaceMutableBooleanSet- Overrides:
collectin classAbstractSynchronizedBooleanCollection
-
cartesianProduct
public LazyIterable<BooleanBooleanPair> cartesianProduct(BooleanSet set)
Description copied from interface:BooleanSetReturns the set whose members are all possible ordered pairs (a, b) where a is a member ofthisand b is a member ofset.- Specified by:
cartesianProductin interfaceBooleanSet
-
equals
public boolean equals(java.lang.Object otherSet)
Description copied from interface:BooleanSetFollows the same general contract asSet.equals(Object).- Specified by:
equalsin interfaceBooleanSet- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
Description copied from interface:BooleanSetFollows the same general contract asSet.hashCode().- Specified by:
hashCodein interfaceBooleanSet- Overrides:
hashCodein classjava.lang.Object
-
asLazy
public LazyBooleanIterable asLazy()
Description copied from interface:BooleanIterableReturns a LazyBooleanIterable adapter wrapping the source BooleanIterable.- Specified by:
asLazyin interfaceBooleanIterable- Overrides:
asLazyin classAbstractSynchronizedBooleanCollection
-
asUnmodifiable
public MutableBooleanSet asUnmodifiable()
- Specified by:
asUnmodifiablein interfaceMutableBooleanCollection- Specified by:
asUnmodifiablein interfaceMutableBooleanSet- Overrides:
asUnmodifiablein classAbstractSynchronizedBooleanCollection
-
asSynchronized
public MutableBooleanSet asSynchronized()
- Specified by:
asSynchronizedin interfaceMutableBooleanCollection- Specified by:
asSynchronizedin interfaceMutableBooleanSet- Overrides:
asSynchronizedin classAbstractSynchronizedBooleanCollection
-
freeze
public BooleanSet freeze()
Description copied from interface:MutableBooleanSetReturns a frozen copy of this set. A frozen copy is the same thing as an immutable copy without safe-publish guarantees.- Specified by:
freezein interfaceBooleanSet- Specified by:
freezein interfaceMutableBooleanSet
-
toImmutable
public ImmutableBooleanSet toImmutable()
Description copied from interface:MutableBooleanSetReturns an immutable copy of this set.- Specified by:
toImmutablein interfaceBooleanSet- Specified by:
toImmutablein interfaceMutableBooleanCollection- Specified by:
toImmutablein interfaceMutableBooleanSet- Overrides:
toImmutablein classAbstractSynchronizedBooleanCollection
-
newEmpty
public MutableBooleanSet newEmpty()
Description copied from interface:MutableBooleanSetCreates a new empty mutable version of the same Set type.- Specified by:
newEmptyin interfaceMutableBooleanCollection- Specified by:
newEmptyin interfaceMutableBooleanSet- Since:
- 9.2.
-
-