public final class CollectionAdapter<T> extends AbstractCollectionAdapter<T> implements Serializable
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.
| Constructor and Description |
|---|
CollectionAdapter(Collection<T> newDelegate) |
| Modifier and Type | Method and Description |
|---|---|
static <E> org.eclipse.collections.api.collection.MutableCollection<E> |
adapt(Collection<E> collection) |
org.eclipse.collections.api.collection.MutableCollection<T> |
asSynchronized() |
org.eclipse.collections.api.collection.MutableCollection<T> |
asUnmodifiable() |
boolean |
equals(Object o) |
int |
hashCode() |
org.eclipse.collections.api.collection.MutableCollection<T> |
newEmpty()
Deprecated.
use
FastList.newList() or UnifiedSet.newSet() instead |
org.eclipse.collections.api.collection.ImmutableCollection<T> |
toImmutable() |
CollectionAdapter<T> |
with(T... elements) |
CollectionAdapter<T> |
with(T element) |
CollectionAdapter<T> |
withAll(Iterable<? extends T> elements) |
CollectionAdapter<T> |
without(T element) |
CollectionAdapter<T> |
withoutAll(Iterable<? extends T> elements) |
static <E> org.eclipse.collections.api.list.MutableList<E> |
wrapList(Iterable<E> iterable) |
static <E> org.eclipse.collections.api.set.MutableSet<E> |
wrapSet(Iterable<E> iterable) |
add, addAll, addAllIterable, aggregateBy, aggregateInPlaceBy, allSatisfy, allSatisfyWith, anySatisfy, anySatisfyWith, appendString, appendString, appendString, asLazy, chunk, clear, collect, collect, collectBoolean, collectBoolean, collectByte, collectByte, collectChar, collectChar, collectDouble, collectDouble, collectFloat, collectFloat, collectIf, collectIf, collectInt, collectInt, collectLong, collectLong, collectShort, collectShort, collectWith, collectWith, contains, containsAll, containsAllArguments, containsAllIterable, count, countWith, detect, detectIfNone, detectWith, detectWithIfNone, each, flatCollect, flatCollect, forEach, forEachWith, forEachWithIndex, getFirst, getLast, groupBy, groupBy, groupByEach, groupByEach, groupByUniqueKey, groupByUniqueKey, injectInto, injectInto, injectInto, injectInto, injectInto, injectIntoWith, isEmpty, iterator, makeString, makeString, makeString, 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, toList, toMap, toSet, toSortedBag, toSortedBag, toSortedBagBy, toSortedList, toSortedList, toSortedListBy, toSortedMap, toSortedMap, toSortedSet, toSortedSet, toSortedSetBy, toString, zip, zip, zipWithIndex, zipWithIndexparallelStream, removeIf, spliterator, streampublic CollectionAdapter(Collection<T> newDelegate)
public org.eclipse.collections.api.collection.MutableCollection<T> asUnmodifiable()
asUnmodifiable in interface org.eclipse.collections.api.collection.MutableCollection<T>public org.eclipse.collections.api.collection.MutableCollection<T> asSynchronized()
asSynchronized in interface org.eclipse.collections.api.collection.MutableCollection<T>public org.eclipse.collections.api.collection.ImmutableCollection<T> toImmutable()
toImmutable in interface org.eclipse.collections.api.collection.MutableCollection<T>public static <E> org.eclipse.collections.api.set.MutableSet<E> wrapSet(Iterable<E> iterable)
public static <E> org.eclipse.collections.api.list.MutableList<E> wrapList(Iterable<E> iterable)
public static <E> org.eclipse.collections.api.collection.MutableCollection<E> adapt(Collection<E> collection)
public boolean equals(Object o)
equals in interface Collection<T>equals in class Objectpublic int hashCode()
hashCode in interface Collection<T>hashCode in class Objectpublic CollectionAdapter<T> with(T... elements)
public CollectionAdapter<T> with(T element)
with in interface org.eclipse.collections.api.collection.MutableCollection<T>public CollectionAdapter<T> without(T element)
without in interface org.eclipse.collections.api.collection.MutableCollection<T>public CollectionAdapter<T> withAll(Iterable<? extends T> elements)
withAll in interface org.eclipse.collections.api.collection.MutableCollection<T>public CollectionAdapter<T> withoutAll(Iterable<? extends T> elements)
withoutAll in interface org.eclipse.collections.api.collection.MutableCollection<T>@Deprecated public org.eclipse.collections.api.collection.MutableCollection<T> newEmpty()
FastList.newList() or UnifiedSet.newSet() insteadnewEmpty in interface org.eclipse.collections.api.collection.MutableCollection<T>Copyright © 2004–2017. All rights reserved.