public final class ArrayAdapter<T> extends AbstractArrayAdapter<T> implements java.io.Serializable, com.gs.collections.api.list.FixedSizeList<T>
AbstractArrayAdapter.add(Object), AbstractArrayAdapter.addAll(Collection), AbstractArrayAdapter.remove(Object), AbstractArrayAdapter.removeAll(Collection), etc. are not supported and will throw
an UnsupportedOperationException. In addition, the mutating iteration methods AbstractArrayAdapter.removeIf(Predicate) and AbstractArrayAdapter.removeIfWith(Predicate2, Object) are not supported and will also
throw an UnsupportedOperationException.
The with(Object) method is not an exception to the above restrictions, as it will create a new
instance of this class with the existing contents plus the new item.
To create a wrapper around an existing array, use the adapt(Object[]) factory method. To wrap the contents
of an existing Collection instance, use the newArray(Iterable) or newArrayWithItem(Iterable,
Object) factory methods. To wrap existing objects in a new array, use one of the newArrayWith(Object)
factory methods.AbstractMutableList.SubList<T>items| Modifier and Type | Method and Description |
|---|---|
static <E> ArrayAdapter<E> |
adapt(E[] array) |
ArrayAdapter<T> |
clone() |
static <E> ArrayAdapter<E> |
newArray() |
static <E> ArrayAdapter<E> |
newArray(java.lang.Iterable<? extends E> source) |
static <E> ArrayAdapter<E> |
newArrayWith(E... elements) |
static <E> ArrayAdapter<E> |
newArrayWith(E one) |
static <E> ArrayAdapter<E> |
newArrayWith(E one,
E two) |
static <E> ArrayAdapter<E> |
newArrayWith(E one,
E two,
E three) |
static <E> ArrayAdapter<E> |
newArrayWith(E one,
E two,
E three,
E four) |
static <E> ArrayAdapter<E> |
newArrayWith(E one,
E two,
E three,
E four,
E five) |
static <E> ArrayAdapter<E> |
newArrayWith(E one,
E two,
E three,
E four,
E five,
E six) |
static <E> ArrayAdapter<E> |
newArrayWith(E one,
E two,
E three,
E four,
E five,
E six,
E seven) |
static <E> ArrayAdapter<E> |
newArrayWithItem(java.lang.Iterable<? extends E> iterable,
E itemToAdd) |
T |
set(int index,
T element) |
ArrayAdapter<T> |
sortThis(java.util.Comparator<? super T> comparator)
Sorts the internal data structure of this list and returns the list itself as a convenience.
|
com.gs.collections.api.list.MutableList<T> |
toReversed()
Returns a new MutableList in reverse order
|
ArrayAdapter<T> |
with(T value)
This method allows mutable and fixed size collections the ability to add elements to their existing elements.
|
ArrayAdapter<T> |
withAll(java.lang.Iterable<? extends T> elements)
This method allows mutable and fixed size collections the ability to add multiple elements to their existing
elements.
|
ArrayAdapter<T> |
without(T element)
This method allows mutable and fixed size collections the ability to remove elements from their existing elements.
|
ArrayAdapter<T> |
withoutAll(java.lang.Iterable<? extends T> elements)
This method allows mutable and fixed size collections the ability to remove multiple elements from their existing
elements.
|
abstractArrayAdapterEquals, add, add, addAll, addAll, addAllIterable, allSatisfy, allSatisfyWith, anySatisfy, anySatisfyWith, appendString, clear, collect, collect, collectIf, collectIf, collectWith, collectWith, contains, containsAll, count, countWith, detect, detectIfNone, detectWith, detectWithIfNone, distinct, equals, flatCollect, flatCollect, forEach, forEach, forEachWith, forEachWithIndex, forEachWithIndex, get, getFirst, getLast, hashCode, indexOf, injectInto, injectIntoWith, isEmpty, iterator, lastIndexOf, listIterator, notEmpty, reject, reject, rejectWith, rejectWith, remove, remove, removeAll, removeAllIterable, removeIf, removeIfWith, retainAll, retainAllIterable, select, select, selectAndRejectWith, selectWith, selectWith, size, subList, toArray, toArrayasReversed, asSynchronized, asUnmodifiable, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectInt, collectLong, collectShort, defaultSort, dropWhile, groupBy, groupByEach, injectInto, injectInto, injectInto, listIterator, max, max, maxBy, min, min, minBy, newEmpty, noneSatisfy, noneSatisfyWith, partition, partitionWhile, reverseForEach, reverseThis, selectInstancesOf, sortThis, sortThisBy, sumOfDouble, sumOfFloat, sumOfInt, sumOfLong, takeWhile, toImmutable, toList, toSet, toSortedList, toSortedList, toStack, zip, zipWithIndexaggregateBy, aggregateInPlaceBy, appendString, appendString, asLazy, chunk, containsAllArguments, containsAllIterable, groupBy, groupByEach, injectInto, makeString, makeString, makeString, toBag, toMap, toSortedListBy, toSortedMap, toSortedMap, toSortedSet, toSortedSet, toSortedSetBy, toString, zip, zipWithIndexfinalize, getClass, notify, notifyAll, wait, wait, waitasSynchronized, asUnmodifiable, collect, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectIf, collectInt, collectLong, collectShort, collectWith, distinct, dropWhile, flatCollect, groupBy, groupByEach, newEmpty, partition, partitionWhile, reject, rejectWith, reverseThis, select, selectInstancesOf, selectWith, sortThis, sortThisBy, subList, takeWhile, toImmutable, zip, zipWithIndexadd, add, addAll, addAll, clear, contains, containsAll, equals, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, retainAll, size, toArray, toArrayequals, forEach, forEachWithIndex, get, getFirst, getLast, hashCode, indexOf, lastIndexOf, listIterator, listIterator, reverseForEach, size, toStackadd, addAll, addAllIterable, clear, remove, removeAll, removeAllIterable, removeIf, removeIfWith, retainAll, retainAllIterableaggregateBy, aggregateInPlaceBy, allSatisfyWith, anySatisfyWith, countWith, detectWith, detectWithIfNone, injectIntoWith, noneSatisfyWith, selectAndRejectWithallSatisfy, anySatisfy, appendString, appendString, appendString, asLazy, chunk, collect, collectIf, collectWith, contains, containsAll, containsAllArguments, containsAllIterable, count, detect, detectIfNone, flatCollect, groupBy, groupByEach, injectInto, injectInto, injectInto, injectInto, injectInto, isEmpty, makeString, makeString, makeString, max, max, maxBy, min, min, minBy, noneSatisfy, notEmpty, reject, rejectWith, select, selectWith, sumOfDouble, sumOfFloat, sumOfInt, sumOfLong, toArray, toArray, toBag, toList, toMap, toSet, toSortedList, toSortedList, toSortedListBy, toSortedMap, toSortedMap, toSortedSet, toSortedSet, toSortedSetBy, toString, zip, zipWithIndexpublic static <E> ArrayAdapter<E> adapt(E[] array)
public static <E> ArrayAdapter<E> newArray()
public static <E> ArrayAdapter<E> newArray(java.lang.Iterable<? extends E> source)
public static <E> ArrayAdapter<E> newArrayWithItem(java.lang.Iterable<? extends E> iterable, E itemToAdd)
public static <E> ArrayAdapter<E> newArrayWith(E one)
public static <E> ArrayAdapter<E> newArrayWith(E one, E two)
public static <E> ArrayAdapter<E> newArrayWith(E one, E two, E three)
public static <E> ArrayAdapter<E> newArrayWith(E one, E two, E three, E four)
public static <E> ArrayAdapter<E> newArrayWith(E one, E two, E three, E four, E five)
public static <E> ArrayAdapter<E> newArrayWith(E one, E two, E three, E four, E five, E six)
public static <E> ArrayAdapter<E> newArrayWith(E one, E two, E three, E four, E five, E six, E seven)
public static <E> ArrayAdapter<E> newArrayWith(E... elements)
public ArrayAdapter<T> with(T value)
com.gs.collections.api.collection.MutableCollectionMutableCollectionIn the case oflist; list = list.with("1"); list = list.with("2"); return list;
FixedSizeCollection a new instance of MutableCollection will be returned by with, and any
variables that previously referenced the original collection will need to be redirected to reference the
new instance. For other MutableCollection types you will replace the reference to collection with the same
collection, since the instance will return "this" after calling add on itself.with in interface com.gs.collections.api.collection.FixedSizeCollection<T>with in interface com.gs.collections.api.collection.MutableCollection<T>with in interface com.gs.collections.api.list.MutableList<T>with in class AbstractMutableList<T>Collection.add(Object)public ArrayAdapter<T> without(T element)
com.gs.collections.api.collection.MutableCollectionMutableCollectionIn the case oflist; list = list.without("1"); list = list.without("2"); return list;
FixedSizeCollection a new instance of MutableCollection will be returned by without, and
any variables that previously referenced the original collection will need to be redirected to reference the
new instance. For other MutableCollection types you will replace the reference to collection with the same
collection, since the instance will return "this" after calling remove on itself.without in interface com.gs.collections.api.collection.FixedSizeCollection<T>without in interface com.gs.collections.api.collection.MutableCollection<T>without in interface com.gs.collections.api.list.MutableList<T>without in class AbstractMutableList<T>Collection.remove(Object)public ArrayAdapter<T> withAll(java.lang.Iterable<? extends T> elements)
com.gs.collections.api.collection.MutableCollectionMutableCollectionIn the case oflist; list = list.withAll(FastList.newListWith("1", "2")); return list;
FixedSizeCollection a new instance of MutableCollection will be returned by withAll, and
any variables that previously referenced the original collection will need to be redirected to reference the
new instance. For other MutableCollection types you will replace the reference to collection with the same
collection, since the instance will return "this" after calling addAll on itself.withAll in interface com.gs.collections.api.collection.FixedSizeCollection<T>withAll in interface com.gs.collections.api.collection.MutableCollection<T>withAll in interface com.gs.collections.api.list.MutableList<T>withAll in class AbstractMutableList<T>Collection.addAll(Collection)public ArrayAdapter<T> withoutAll(java.lang.Iterable<? extends T> elements)
com.gs.collections.api.collection.MutableCollectionMutableCollectionIn the case oflist; list = list.withoutAll(FastList.newListWith("1", "2")); return list;
FixedSizeCollection a new instance of MutableCollection will be returned by withoutAll,
and any variables that previously referenced the original collection will need to be redirected to reference the
new instance. For other MutableCollection types you will replace the reference to collection with the same
collection, since the instance will return "this" after calling removeAll on itself.withoutAll in interface com.gs.collections.api.collection.FixedSizeCollection<T>withoutAll in interface com.gs.collections.api.collection.MutableCollection<T>withoutAll in interface com.gs.collections.api.list.MutableList<T>withoutAll in class AbstractMutableList<T>Collection.removeAll(Collection)public ArrayAdapter<T> clone()
clone in interface com.gs.collections.api.list.MutableList<T>clone in class AbstractMutableList<T>public ArrayAdapter<T> sortThis(java.util.Comparator<? super T> comparator)
com.gs.collections.api.list.MutableListsortThis in interface com.gs.collections.api.list.MutableList<T>sortThis in class AbstractMutableList<T>public com.gs.collections.api.list.MutableList<T> toReversed()
com.gs.collections.api.list.MutableListtoReversed in interface com.gs.collections.api.list.MutableList<T>toReversed in class AbstractMutableList<T>