Class SynchronizedIntSet
- java.lang.Object
-
- org.eclipse.collections.impl.collection.mutable.primitive.AbstractSynchronizedIntCollection
-
- org.eclipse.collections.impl.set.mutable.primitive.SynchronizedIntSet
-
- All Implemented Interfaces:
Serializable
,MutableIntCollection
,IntIterable
,PrimitiveIterable
,IntSet
,MutableIntSet
public class SynchronizedIntSet extends AbstractSynchronizedIntCollection implements MutableIntSet
A synchronized view of aMutableIntSet
. It is imperative that the user manually synchronize on the collection when iterating over it using theIntIterator
, as perCollections.synchronizedCollection(Collection)
.This file was automatically generated from template file synchronizedPrimitiveSet.stg.
- Since:
- 3.1.
- See Also:
MutableIntSet.asSynchronized()
,MutableSet.asSynchronized()
, Serialized Form
-
-
Constructor Summary
Constructors Constructor Description SynchronizedIntSet(MutableIntSet set)
SynchronizedIntSet(MutableIntSet set, Object newLock)
-
Method Summary
-
Methods inherited from class org.eclipse.collections.impl.collection.mutable.primitive.AbstractSynchronizedIntCollection
add, addAll, addAll, allSatisfy, anySatisfy, appendString, appendString, appendString, average, chunk, clear, contains, containsAll, containsAll, containsAny, containsAny, containsNone, containsNone, count, detectIfNone, each, injectInto, intIterator, 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 interface org.eclipse.collections.api.IntIterable
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.IntSet
isProperSubsetOf, isSubsetOf
-
Methods inherited from interface org.eclipse.collections.api.collection.primitive.MutableIntCollection
add, addAll, addAll, clear, intIterator, remove, removeAll, removeAll, removeIf, retainAll, retainAll
-
Methods inherited from interface org.eclipse.collections.api.set.primitive.MutableIntSet
difference, intersect, symmetricDifference, tap, union
-
Methods inherited from interface org.eclipse.collections.api.PrimitiveIterable
appendString, appendString, appendString, isEmpty, makeString, makeString, makeString, notEmpty, size, toString
-
-
-
-
Constructor Detail
-
SynchronizedIntSet
public SynchronizedIntSet(MutableIntSet set)
-
SynchronizedIntSet
public SynchronizedIntSet(MutableIntSet set, Object newLock)
-
-
Method Detail
-
of
public static SynchronizedIntSet of(MutableIntSet set)
This method will take a MutableIntSet and wrap it directly in a SynchronizedIntSet.
-
of
public static SynchronizedIntSet of(MutableIntSet set, Object lock)
This method will take a MutableIntSet and wrap it directly in a SynchronizedIntSet. Additionally, a developer specifies which lock to use with the collection.
-
without
public SynchronizedIntSet without(int element)
- Specified by:
without
in interfaceMutableIntCollection
- Specified by:
without
in interfaceMutableIntSet
- Overrides:
without
in classAbstractSynchronizedIntCollection
-
boxed
public MutableSet<Integer> boxed()
- Specified by:
boxed
in interfaceMutableIntSet
-
with
public SynchronizedIntSet with(int element)
- Specified by:
with
in interfaceMutableIntCollection
- Specified by:
with
in interfaceMutableIntSet
- Overrides:
with
in classAbstractSynchronizedIntCollection
-
withAll
public SynchronizedIntSet withAll(IntIterable elements)
- Specified by:
withAll
in interfaceMutableIntCollection
- Specified by:
withAll
in interfaceMutableIntSet
- Overrides:
withAll
in classAbstractSynchronizedIntCollection
-
withoutAll
public SynchronizedIntSet withoutAll(IntIterable elements)
- Specified by:
withoutAll
in interfaceMutableIntCollection
- Specified by:
withoutAll
in interfaceMutableIntSet
- Overrides:
withoutAll
in classAbstractSynchronizedIntCollection
-
select
public MutableIntSet select(IntPredicate predicate)
- Specified by:
select
in interfaceIntIterable
- Specified by:
select
in interfaceIntSet
- Specified by:
select
in interfaceMutableIntCollection
- Specified by:
select
in interfaceMutableIntSet
- Overrides:
select
in classAbstractSynchronizedIntCollection
-
reject
public MutableIntSet reject(IntPredicate predicate)
- Specified by:
reject
in interfaceIntIterable
- Specified by:
reject
in interfaceIntSet
- Specified by:
reject
in interfaceMutableIntCollection
- Specified by:
reject
in interfaceMutableIntSet
- Overrides:
reject
in classAbstractSynchronizedIntCollection
-
collect
public <V> MutableSet<V> collect(IntToObjectFunction<? extends V> function)
- Specified by:
collect
in interfaceIntIterable
- Specified by:
collect
in interfaceIntSet
- Specified by:
collect
in interfaceMutableIntCollection
- Specified by:
collect
in interfaceMutableIntSet
- Overrides:
collect
in classAbstractSynchronizedIntCollection
-
cartesianProduct
public LazyIterable<IntIntPair> cartesianProduct(IntSet set)
- Specified by:
cartesianProduct
in interfaceIntSet
-
equals
public boolean equals(Object otherSet)
-
hashCode
public int hashCode()
-
asLazy
public LazyIntIterable asLazy()
- Specified by:
asLazy
in interfaceIntIterable
- Overrides:
asLazy
in classAbstractSynchronizedIntCollection
-
asUnmodifiable
public MutableIntSet asUnmodifiable()
- Specified by:
asUnmodifiable
in interfaceMutableIntCollection
- Specified by:
asUnmodifiable
in interfaceMutableIntSet
- Overrides:
asUnmodifiable
in classAbstractSynchronizedIntCollection
-
asSynchronized
public MutableIntSet asSynchronized()
- Specified by:
asSynchronized
in interfaceMutableIntCollection
- Specified by:
asSynchronized
in interfaceMutableIntSet
- Overrides:
asSynchronized
in classAbstractSynchronizedIntCollection
-
freeze
public IntSet freeze()
- Specified by:
freeze
in interfaceIntSet
- Specified by:
freeze
in interfaceMutableIntSet
-
toImmutable
public ImmutableIntSet toImmutable()
- Specified by:
toImmutable
in interfaceIntSet
- Specified by:
toImmutable
in interfaceMutableIntCollection
- Specified by:
toImmutable
in interfaceMutableIntSet
- Overrides:
toImmutable
in classAbstractSynchronizedIntCollection
-
newEmpty
public MutableIntSet newEmpty()
- Specified by:
newEmpty
in interfaceMutableIntCollection
- Specified by:
newEmpty
in interfaceMutableIntSet
- Since:
- 9.2.
-
-