Class SynchronizedFloatSet
- java.lang.Object
-
- org.eclipse.collections.impl.collection.mutable.primitive.AbstractSynchronizedFloatCollection
-
- org.eclipse.collections.impl.set.mutable.primitive.SynchronizedFloatSet
-
- All Implemented Interfaces:
java.io.Serializable
,MutableFloatCollection
,FloatIterable
,PrimitiveIterable
,FloatSet
,MutableFloatSet
public class SynchronizedFloatSet extends AbstractSynchronizedFloatCollection implements MutableFloatSet
A synchronized view of aMutableFloatSet
. It is imperative that the user manually synchronize on the collection when iterating over it using theFloatIterator
, as perCollections.synchronizedCollection(Collection)
.This file was automatically generated from template file synchronizedPrimitiveSet.stg.
- Since:
- 3.1.
- See Also:
MutableFloatSet.asSynchronized()
,MutableSet.asSynchronized()
, Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private static long
serialVersionUID
-
Constructor Summary
Constructors Constructor Description SynchronizedFloatSet(MutableFloatSet set)
SynchronizedFloatSet(MutableFloatSet set, java.lang.Object newLock)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description LazyFloatIterable
asLazy()
Returns a LazyFloatIterable adapter wrapping the source FloatIterable.MutableFloatSet
asSynchronized()
MutableFloatSet
asUnmodifiable()
LazyIterable<FloatFloatPair>
cartesianProduct(FloatSet set)
Returns the set whose members are all possible ordered pairs (a, b) where a is a member ofthis
and b is a member ofset
.<V> MutableSet<V>
collect(FloatToObjectFunction<? extends V> function)
Returns a new collection with the results of applying the specified function on each element of the source collection.boolean
equals(java.lang.Object otherSet)
Follows the same general contract asSet.equals(Object)
.FloatSet
freeze()
Returns a frozen copy of this set.private MutableFloatSet
getMutableFloatSet()
int
hashCode()
Follows the same general contract asSet.hashCode()
.MutableFloatSet
newEmpty()
Creates a new empty mutable version of the same Set type.static SynchronizedFloatSet
of(MutableFloatSet set)
This method will take a MutableFloatSet and wrap it directly in a SynchronizedFloatSet.static SynchronizedFloatSet
of(MutableFloatSet set, java.lang.Object lock)
This method will take a MutableFloatSet and wrap it directly in a SynchronizedFloatSet.MutableFloatSet
reject(FloatPredicate predicate)
Returns a new FloatIterable with all of the elements in the FloatIterable that return false for the specified predicate.MutableFloatSet
select(FloatPredicate predicate)
Returns a new FloatIterable with all of the elements in the FloatIterable that return true for the specified predicate.ImmutableFloatSet
toImmutable()
Returns an immutable copy of this set.SynchronizedFloatSet
with(float element)
SynchronizedFloatSet
withAll(FloatIterable elements)
SynchronizedFloatSet
without(float element)
SynchronizedFloatSet
withoutAll(FloatIterable elements)
-
Methods inherited from class org.eclipse.collections.impl.collection.mutable.primitive.AbstractSynchronizedFloatCollection
add, addAll, addAll, allSatisfy, anySatisfy, appendString, appendString, appendString, average, chunk, clear, contains, containsAll, containsAll, containsAny, containsAny, containsNone, containsNone, count, detectIfNone, each, floatIterator, getFloatCollection, getLock, 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, toString
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.eclipse.collections.api.FloatIterable
allSatisfy, anySatisfy, average, averageIfEmpty, 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, max, maxIfEmpty, median, medianIfEmpty, min, minIfEmpty, noneSatisfy, reduce, reduceIfEmpty, reject, select, sum, summaryStatistics, toArray, toArray, toBag, toList, toSet, toSortedArray, toSortedList, toSortedList, toSortedListBy, toSortedListBy
-
Methods inherited from interface org.eclipse.collections.api.set.primitive.FloatSet
isProperSubsetOf, isSubsetOf
-
Methods inherited from interface org.eclipse.collections.api.collection.primitive.MutableFloatCollection
add, addAll, addAll, clear, floatIterator, remove, removeAll, removeAll, removeIf, retainAll, retainAll
-
Methods inherited from interface org.eclipse.collections.api.set.primitive.MutableFloatSet
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
-
SynchronizedFloatSet
public SynchronizedFloatSet(MutableFloatSet set)
-
SynchronizedFloatSet
public SynchronizedFloatSet(MutableFloatSet set, java.lang.Object newLock)
-
-
Method Detail
-
of
public static SynchronizedFloatSet of(MutableFloatSet set)
This method will take a MutableFloatSet and wrap it directly in a SynchronizedFloatSet.
-
of
public static SynchronizedFloatSet of(MutableFloatSet set, java.lang.Object lock)
This method will take a MutableFloatSet and wrap it directly in a SynchronizedFloatSet. Additionally, a developer specifies which lock to use with the collection.
-
getMutableFloatSet
private MutableFloatSet getMutableFloatSet()
-
without
public SynchronizedFloatSet without(float element)
- Specified by:
without
in interfaceMutableFloatCollection
- Specified by:
without
in interfaceMutableFloatSet
- Overrides:
without
in classAbstractSynchronizedFloatCollection
-
with
public SynchronizedFloatSet with(float element)
- Specified by:
with
in interfaceMutableFloatCollection
- Specified by:
with
in interfaceMutableFloatSet
- Overrides:
with
in classAbstractSynchronizedFloatCollection
-
withAll
public SynchronizedFloatSet withAll(FloatIterable elements)
- Specified by:
withAll
in interfaceMutableFloatCollection
- Specified by:
withAll
in interfaceMutableFloatSet
- Overrides:
withAll
in classAbstractSynchronizedFloatCollection
-
withoutAll
public SynchronizedFloatSet withoutAll(FloatIterable elements)
- Specified by:
withoutAll
in interfaceMutableFloatCollection
- Specified by:
withoutAll
in interfaceMutableFloatSet
- Overrides:
withoutAll
in classAbstractSynchronizedFloatCollection
-
select
public MutableFloatSet select(FloatPredicate predicate)
Description copied from interface:FloatIterable
Returns a new FloatIterable with all of the elements in the FloatIterable that return true for the specified predicate.- Specified by:
select
in interfaceFloatIterable
- Specified by:
select
in interfaceFloatSet
- Specified by:
select
in interfaceMutableFloatCollection
- Specified by:
select
in interfaceMutableFloatSet
- Overrides:
select
in classAbstractSynchronizedFloatCollection
-
reject
public MutableFloatSet reject(FloatPredicate predicate)
Description copied from interface:FloatIterable
Returns a new FloatIterable with all of the elements in the FloatIterable that return false for the specified predicate.- Specified by:
reject
in interfaceFloatIterable
- Specified by:
reject
in interfaceFloatSet
- Specified by:
reject
in interfaceMutableFloatCollection
- Specified by:
reject
in interfaceMutableFloatSet
- Overrides:
reject
in classAbstractSynchronizedFloatCollection
-
collect
public <V> MutableSet<V> collect(FloatToObjectFunction<? extends V> function)
Description copied from interface:FloatIterable
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 interfaceFloatIterable
- Specified by:
collect
in interfaceFloatSet
- Specified by:
collect
in interfaceMutableFloatCollection
- Specified by:
collect
in interfaceMutableFloatSet
- Overrides:
collect
in classAbstractSynchronizedFloatCollection
-
cartesianProduct
public LazyIterable<FloatFloatPair> cartesianProduct(FloatSet set)
Description copied from interface:FloatSet
Returns the set whose members are all possible ordered pairs (a, b) where a is a member ofthis
and b is a member ofset
.- Specified by:
cartesianProduct
in interfaceFloatSet
-
equals
public boolean equals(java.lang.Object otherSet)
Description copied from interface:FloatSet
Follows the same general contract asSet.equals(Object)
.
-
hashCode
public int hashCode()
Description copied from interface:FloatSet
Follows the same general contract asSet.hashCode()
.
-
asLazy
public LazyFloatIterable asLazy()
Description copied from interface:FloatIterable
Returns a LazyFloatIterable adapter wrapping the source FloatIterable.- Specified by:
asLazy
in interfaceFloatIterable
- Overrides:
asLazy
in classAbstractSynchronizedFloatCollection
-
asUnmodifiable
public MutableFloatSet asUnmodifiable()
- Specified by:
asUnmodifiable
in interfaceMutableFloatCollection
- Specified by:
asUnmodifiable
in interfaceMutableFloatSet
- Overrides:
asUnmodifiable
in classAbstractSynchronizedFloatCollection
-
asSynchronized
public MutableFloatSet asSynchronized()
- Specified by:
asSynchronized
in interfaceMutableFloatCollection
- Specified by:
asSynchronized
in interfaceMutableFloatSet
- Overrides:
asSynchronized
in classAbstractSynchronizedFloatCollection
-
freeze
public FloatSet freeze()
Description copied from interface:MutableFloatSet
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 interfaceFloatSet
- Specified by:
freeze
in interfaceMutableFloatSet
-
toImmutable
public ImmutableFloatSet toImmutable()
Description copied from interface:MutableFloatSet
Returns an immutable copy of this set.- Specified by:
toImmutable
in interfaceFloatSet
- Specified by:
toImmutable
in interfaceMutableFloatCollection
- Specified by:
toImmutable
in interfaceMutableFloatSet
- Overrides:
toImmutable
in classAbstractSynchronizedFloatCollection
-
newEmpty
public MutableFloatSet newEmpty()
Description copied from interface:MutableFloatSet
Creates a new empty mutable version of the same Set type.- Specified by:
newEmpty
in interfaceMutableFloatCollection
- Specified by:
newEmpty
in interfaceMutableFloatSet
- Since:
- 9.2.
-
-