Class CollectionAdapter<T>
java.lang.Object
org.eclipse.collections.impl.collection.mutable.AbstractCollectionAdapter<T>
org.eclipse.collections.impl.collection.mutable.CollectionAdapter<T>
- All Implemented Interfaces:
Serializable,Iterable<T>,Collection<T>,MutableCollection<T>,InternalIterable<T>,RichIterable<T>
public final class CollectionAdapter<T>
extends AbstractCollectionAdapter<T>
implements Serializable
This class provides a MutableCollection interface wrapper around a JDK Collections Collection interface instance.
All the MutableCollection interface methods are supported in addition to the JDK Collection interface methods.
To create a new instance that wraps a collection with the MutableSet interface, use the wrapSet(Iterable)
factory method. To create a new instance that wraps a collection with the MutableList interface, use the
wrapList(Iterable) factory method. To wrap a collection with the MutableCollection interface alone, use
the adapt(Collection) factory method.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <E> MutableCollection<E>adapt(Collection<E> collection) booleaninthashCode()newEmpty()Deprecated.withoutAll(Iterable<? extends T> elements) static <E> MutableList<E>static <E> MutableSet<E>Methods inherited from class org.eclipse.collections.impl.collection.mutable.AbstractCollectionAdapter
add, addAll, addAllIterable, allSatisfy, allSatisfyWith, anySatisfy, anySatisfyWith, appendString, asLazy, chunk, clear, collect, collect, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectIf, collectIf, collectInt, collectLong, collectShort, collectWith, collectWith, contains, containsAll, containsAllArguments, containsAllIterable, count, countWith, detect, detectIfNone, detectOptional, detectWith, detectWithIfNone, detectWithOptional, each, flatCollect, flatCollect, forEachWith, forEachWithIndex, getFirst, getLast, getOnly, groupBy, groupBy, groupByEach, groupByEach, groupByUniqueKey, groupByUniqueKey, injectInto, injectInto, injectInto, injectInto, injectInto, injectIntoWith, into, isEmpty, iterator, max, max, maxBy, min, min, minBy, noneSatisfy, noneSatisfyWith, notEmpty, partition, partitionWith, reject, reject, rejectWith, rejectWith, remove, removeAll, removeAllIterable, removeIf, removeIfWith, retainAll, retainAllIterable, select, select, selectAndRejectWith, selectInstancesOf, selectWith, selectWith, size, sumByDouble, sumByFloat, sumByInt, sumByLong, sumOfDouble, sumOfFloat, sumOfInt, sumOfLong, tap, toArray, toArray, toBag, toBiMap, toList, toMap, toMap, toSet, toSortedBag, toSortedBag, toSortedList, toSortedMap, toSortedMap, toSortedSet, toSortedSet, toString, zip, zip, zipWithIndex, zipWithIndexMethods inherited from interface java.util.Collection
parallelStream, removeIf, spliterator, stream, toArrayMethods inherited from interface org.eclipse.collections.api.InternalIterable
forEachMethods inherited from interface org.eclipse.collections.api.collection.MutableCollection
aggregateBy, aggregateInPlaceBy, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectInt, collectLong, collectShort, countBy, countByEach, countByWith, flatCollectWithMethods inherited from interface org.eclipse.collections.api.RichIterable
aggregateBy, appendString, appendString, containsAny, containsAnyIterable, containsBy, containsNone, containsNoneIterable, countBy, countByEach, countByWith, flatCollectBoolean, flatCollectByte, flatCollectChar, flatCollectDouble, flatCollectFloat, flatCollectInt, flatCollectLong, flatCollectShort, flatCollectWith, forEach, getAny, groupByAndCollect, injectIntoDouble, injectIntoFloat, injectIntoInt, injectIntoLong, makeString, makeString, makeString, makeString, maxByOptional, maxOptional, maxOptional, minByOptional, minOptional, minOptional, reduce, reduceBy, reduceBy, reduceInPlace, reduceInPlace, summarizeDouble, summarizeFloat, summarizeInt, summarizeLong, toImmutableBag, toImmutableBiMap, toImmutableList, toImmutableMap, toImmutableSet, toImmutableSortedBag, toImmutableSortedBag, toImmutableSortedBagBy, toImmutableSortedList, toImmutableSortedList, toImmutableSortedListBy, toImmutableSortedSet, toImmutableSortedSet, toImmutableSortedSetBy, toSortedBagBy, toSortedList, toSortedListBy, toSortedMapBy, toSortedSetBy
-
Constructor Details
-
CollectionAdapter
-
-
Method Details
-
asUnmodifiable
- Specified by:
asUnmodifiablein interfaceMutableCollection<T>
-
asSynchronized
- Specified by:
asSynchronizedin interfaceMutableCollection<T>
-
toImmutable
- Specified by:
toImmutablein interfaceMutableCollection<T>
-
wrapSet
-
wrapList
-
adapt
-
equals
- Specified by:
equalsin interfaceCollection<T>- Overrides:
equalsin classObject
-
hashCode
public int hashCode()- Specified by:
hashCodein interfaceCollection<T>- Overrides:
hashCodein classObject
-
with
-
with
- Specified by:
within interfaceMutableCollection<T>
-
without
- Specified by:
withoutin interfaceMutableCollection<T>
-
withAll
- Specified by:
withAllin interfaceMutableCollection<T>
-
withoutAll
- Specified by:
withoutAllin interfaceMutableCollection<T>
-
newEmpty
Deprecated.useFastList.newList()orUnifiedSet.newSet()instead- Specified by:
newEmptyin interfaceMutableCollection<T>
-
FastList.newList()orUnifiedSet.newSet()instead