Class SynchronizedMutableCollection<T>
java.lang.Object
org.eclipse.collections.impl.collection.AbstractSynchronizedRichIterable<T>
org.eclipse.collections.impl.collection.mutable.AbstractSynchronizedMutableCollection<T>
org.eclipse.collections.impl.collection.mutable.SynchronizedMutableCollection<T>
- All Implemented Interfaces:
Serializable,Iterable<T>,Collection<T>,MutableCollection<T>,InternalIterable<T>,RichIterable<T>
public class SynchronizedMutableCollection<T>
extends AbstractSynchronizedMutableCollection<T>
implements Serializable
A synchronized view of a
MutableCollection. It is imperative that the user manually synchronize on the collection when iterating over it using the
standard JDK iterator or JDK 5 for loop, as per Collections.synchronizedCollection(Collection).-
Method Summary
Modifier and TypeMethodDescriptionnewEmpty()static <E,C extends Collection<E>>
SynchronizedMutableCollection<E>of(C collection) This method will take a MutableCollection and wrap it directly in a SynchronizedMutableCollection.static <E,C extends Collection<E>>
SynchronizedMutableCollection<E>This method will take a MutableCollection and wrap it directly in a SynchronizedMutableCollection.withoutAll(Iterable<? extends T> elements) Methods inherited from class org.eclipse.collections.impl.collection.mutable.AbstractSynchronizedMutableCollection
add, addAll, addAllIterable, aggregateBy, aggregateInPlaceBy, clear, collect, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectIf, collectInt, collectLong, collectShort, collectWith, countBy, countByEach, countByWith, flatCollect, groupBy, groupByEach, groupByUniqueKey, injectIntoWith, partition, partitionWith, reject, rejectWith, remove, removeAll, removeAllIterable, removeIf, removeIfWith, retainAll, retainAllIterable, select, selectAndRejectWith, selectInstancesOf, selectWith, sumByDouble, sumByFloat, sumByInt, sumByLong, tap, zip, zipWithIndexMethods inherited from class org.eclipse.collections.impl.collection.AbstractSynchronizedRichIterable
allSatisfy, allSatisfyWith, anySatisfy, anySatisfyWith, appendString, appendString, appendString, asLazy, chunk, collect, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectIf, collectInt, collectLong, collectShort, collectWith, contains, containsAll, containsAllArguments, containsAllIterable, containsAny, containsAnyIterable, containsNone, containsNoneIterable, count, countBy, countByEach, countByWith, countWith, detect, detectIfNone, detectOptional, detectWith, detectWithIfNone, detectWithOptional, each, equals, flatCollect, flatCollectBoolean, flatCollectByte, flatCollectChar, flatCollectDouble, flatCollectFloat, flatCollectInt, flatCollectLong, flatCollectShort, forEachWith, forEachWithIndex, getFirst, getLast, getOnly, groupBy, groupByEach, groupByUniqueKey, hashCode, injectInto, injectInto, injectInto, injectInto, injectInto, into, isEmpty, iterator, makeString, makeString, makeString, makeString, max, max, maxBy, maxByOptional, maxOptional, maxOptional, min, min, minBy, minByOptional, minOptional, minOptional, noneSatisfy, noneSatisfyWith, notEmpty, reduceBy, reject, rejectWith, select, selectWith, size, sumOfDouble, sumOfFloat, sumOfInt, sumOfLong, toArray, toArray, toBag, toBiMap, toImmutableBag, toImmutableList, toImmutableSet, toImmutableSortedBag, toImmutableSortedBag, toImmutableSortedBagBy, toImmutableSortedList, toImmutableSortedList, toImmutableSortedSet, toImmutableSortedSet, toImmutableSortedSetBy, toList, toMap, toMap, toSet, toSortedBag, toSortedBag, toSortedList, toSortedList, toSortedListBy, toSortedMap, toSortedMap, toSortedMapBy, toSortedSet, toSortedSet, toString, zip, zipWithIndexMethods inherited from interface java.util.Collection
contains, containsAll, equals, hashCode, isEmpty, iterator, parallelStream, removeIf, size, spliterator, stream, toArrayMethods inherited from interface org.eclipse.collections.api.InternalIterable
forEach, forEachWith, forEachWithIndexMethods inherited from interface org.eclipse.collections.api.collection.MutableCollection
flatCollectWith, toArray, toArrayMethods inherited from interface org.eclipse.collections.api.RichIterable
aggregateBy, allSatisfy, allSatisfyWith, anySatisfy, anySatisfyWith, appendString, appendString, appendString, asLazy, chunk, collect, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectIf, collectInt, collectLong, collectShort, collectWith, contains, containsAll, containsAllArguments, containsAllIterable, containsAny, containsAnyIterable, containsBy, containsNone, containsNoneIterable, count, countBy, countByEach, countByWith, countWith, detect, detectIfNone, detectOptional, detectWith, detectWithIfNone, detectWithOptional, each, flatCollect, flatCollectBoolean, flatCollectByte, flatCollectChar, flatCollectDouble, flatCollectFloat, flatCollectInt, flatCollectLong, flatCollectShort, flatCollectWith, forEach, getAny, getFirst, getLast, getOnly, groupBy, groupByAndCollect, groupByEach, groupByUniqueKey, injectInto, injectInto, injectInto, injectInto, injectInto, injectIntoDouble, injectIntoFloat, injectIntoInt, injectIntoLong, into, isEmpty, makeString, makeString, makeString, makeString, max, max, maxBy, maxByOptional, maxOptional, maxOptional, min, min, minBy, minByOptional, minOptional, minOptional, noneSatisfy, noneSatisfyWith, notEmpty, reduce, reduceBy, reduceBy, reduceInPlace, reduceInPlace, reject, rejectWith, select, selectWith, size, summarizeDouble, summarizeFloat, summarizeInt, summarizeLong, sumOfDouble, sumOfFloat, sumOfInt, sumOfLong, toBag, toBiMap, toImmutableBag, toImmutableBiMap, toImmutableList, toImmutableMap, toImmutableSet, toImmutableSortedBag, toImmutableSortedBag, toImmutableSortedBagBy, toImmutableSortedList, toImmutableSortedList, toImmutableSortedListBy, toImmutableSortedSet, toImmutableSortedSet, toImmutableSortedSetBy, toList, toMap, toMap, toSet, toSortedBag, toSortedBag, toSortedBagBy, toSortedList, toSortedList, toSortedListBy, toSortedMap, toSortedMap, toSortedMapBy, toSortedSet, toSortedSet, toSortedSetBy, toString, zip, zipWithIndex
-
Method Details
-
of
This method will take a MutableCollection and wrap it directly in a SynchronizedMutableCollection. It will take any other non-Eclipse-Collections collection and first adapt it will a CollectionAdapter, and then return a SynchronizedMutableCollection that wraps the adapter. -
of
public static <E,C extends Collection<E>> SynchronizedMutableCollection<E> of(C collection, Object lock) This method will take a MutableCollection and wrap it directly in a SynchronizedMutableCollection. It will take any other non-Eclipse-Collections collection and first adapt it will a CollectionAdapter, and then return a SynchronizedMutableCollection that wraps the adapter. Additionally, a developer specifies which lock to use with the collection. -
with
- Specified by:
within interfaceMutableCollection<T>
-
without
- Specified by:
withoutin interfaceMutableCollection<T>
-
withAll
- Specified by:
withAllin interfaceMutableCollection<T>
-
withoutAll
- Specified by:
withoutAllin interfaceMutableCollection<T>
-
asUnmodifiable
- Specified by:
asUnmodifiablein interfaceMutableCollection<T>
-
asSynchronized
- Specified by:
asSynchronizedin interfaceMutableCollection<T>
-
toImmutable
- Specified by:
toImmutablein interfaceMutableCollection<T>
-
newEmpty
- Specified by:
newEmptyin interfaceMutableCollection<T>
-