protected static class AbstractMutableList.SubList<T> extends AbstractMutableList<T> implements java.io.Serializable, java.util.RandomAccess
AbstractMutableList.SubList<T>| Modifier | Constructor and Description |
|---|---|
protected |
AbstractMutableList.SubList(AbstractMutableList<T> list,
int fromIndex,
int toIndex) |
| Modifier and Type | Method and Description |
|---|---|
void |
add(int index,
T element) |
boolean |
add(T o) |
boolean |
addAll(java.util.Collection<? extends T> collection) |
boolean |
addAll(int index,
java.util.Collection<? extends T> collection) |
void |
clear() |
com.gs.collections.api.list.MutableList<T> |
clone() |
void |
forEach(com.gs.collections.api.block.procedure.Procedure<? super T> procedure)
The procedure is executed for each element in the iterable.
|
<P> void |
forEachWith(com.gs.collections.api.block.procedure.Procedure2<? super T,? super P> procedure,
P parameter)
The procedure2 is evaluated for each element in the iterable with the specified parameter provided
as the second argument.
|
void |
forEachWithIndex(com.gs.collections.api.block.procedure.primitive.ObjectIntProcedure<? super T> objectIntProcedure)
Iterates over the iterable passing each element and the current relative int index to the specified instance of
ObjectIntProcedure
|
T |
get(int index)
Returns the item at the specified position in this list iterable.
|
T |
getFirst()
Returns the first element of an iterable.
|
T |
getLast()
Returns the last element of an iterable.
|
java.util.Iterator<T> |
iterator() |
java.util.ListIterator<T> |
listIterator(int index) |
T |
remove(int index) |
T |
set(int index,
T element) |
int |
size()
Returns the value of the size of this iterable
|
com.gs.collections.api.list.MutableList<T> |
subList(int fromIndex,
int toIndex) |
com.gs.collections.api.list.MutableList<T> |
toReversed()
Returns a new MutableList in reverse order
|
com.gs.collections.api.stack.MutableStack<T> |
toStack()
Converts the list to a mutable MutableStack implementation.
|
protected java.lang.Object |
writeReplace() |
allSatisfy, allSatisfyWith, anySatisfy, anySatisfyWith, appendString, asReversed, asSynchronized, asUnmodifiable, collect, collect, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectIf, collectIf, collectInt, collectLong, collectShort, collectWith, collectWith, contains, containsAll, count, countWith, defaultSort, detect, detectIfNone, detectWith, detectWithIfNone, distinct, dropWhile, equals, flatCollect, flatCollect, forEach, forEachWithIndex, groupBy, groupByEach, hashCode, indexOf, injectInto, injectInto, injectInto, injectInto, injectIntoWith, lastIndexOf, listIterator, max, max, maxBy, min, min, minBy, newEmpty, noneSatisfy, noneSatisfyWith, partition, partitionWhile, reject, reject, rejectWith, rejectWith, removeAll, removeIf, removeIfWith, retainAll, reverseForEach, reverseThis, select, select, selectAndRejectWith, selectInstancesOf, selectWith, selectWith, sortThis, sortThis, sortThisBy, sumOfDouble, sumOfFloat, sumOfInt, sumOfLong, takeWhile, toImmutable, toList, toSet, toSortedList, toSortedList, with, withAll, without, withoutAll, zip, zipWithIndexaddAllIterable, aggregateBy, aggregateInPlaceBy, appendString, appendString, asLazy, chunk, containsAllArguments, containsAllIterable, groupBy, groupByEach, injectInto, makeString, makeString, makeString, notEmpty, removeAllIterable, retainAllIterable, toBag, toMap, toSortedListBy, toSortedMap, toSortedMap, toSortedSet, toSortedSet, toSortedSetBy, toString, zip, zipWithIndexfinalize, getClass, notify, notifyAll, wait, wait, waitaddAllIterable, aggregateBy, aggregateInPlaceBy, removeAllIterable, retainAllIterableappendString, appendString, asLazy, chunk, containsAllArguments, containsAllIterable, groupBy, groupByEach, injectInto, isEmpty, makeString, makeString, makeString, notEmpty, toArray, toArray, toBag, toMap, toSortedListBy, toSortedMap, toSortedMap, toSortedSet, toSortedSet, toSortedSetBy, toString, zip, zipWithIndexprotected AbstractMutableList.SubList(AbstractMutableList<T> list, int fromIndex, int toIndex)
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>protected java.lang.Object writeReplace()
public boolean add(T o)
public T get(int index)
com.gs.collections.api.list.ListIterablepublic int size()
com.gs.collections.api.list.ListIterablesize in interface com.gs.collections.api.list.ListIterable<T>size in interface com.gs.collections.api.RichIterable<T>size in interface java.util.Collection<T>size in interface java.util.List<T>size in class java.util.AbstractCollection<T>public void clear()
public boolean addAll(java.util.Collection<? extends T> collection)
public boolean addAll(int index,
java.util.Collection<? extends T> collection)
addAll in interface java.util.List<T>public java.util.Iterator<T> iterator()
public java.util.ListIterator<T> listIterator(int index)
listIterator in interface com.gs.collections.api.list.ListIterable<T>listIterator in interface java.util.List<T>listIterator in class AbstractMutableList<T>List.listIterator(int)public com.gs.collections.api.list.MutableList<T> subList(int fromIndex, int toIndex)
subList in interface com.gs.collections.api.list.MutableList<T>subList in interface java.util.List<T>subList in class AbstractMutableList<T>public com.gs.collections.api.list.MutableList<T> clone()
clone in interface com.gs.collections.api.list.MutableList<T>clone in class AbstractMutableList<T>public T getFirst()
com.gs.collections.api.RichIterablegetFirst in interface com.gs.collections.api.list.ListIterable<T>getFirst in interface com.gs.collections.api.RichIterable<T>getFirst in class AbstractMutableList<T>public T getLast()
com.gs.collections.api.RichIterablegetLast in interface com.gs.collections.api.list.ListIterable<T>getLast in interface com.gs.collections.api.RichIterable<T>getLast in class AbstractMutableList<T>public com.gs.collections.api.stack.MutableStack<T> toStack()
com.gs.collections.api.list.ListIterabletoStack in interface com.gs.collections.api.list.ListIterable<T>toStack in class AbstractMutableList<T>public void forEach(com.gs.collections.api.block.procedure.Procedure<? super T> procedure)
com.gs.collections.api.InternalIterablee.g. people.forEach(new Procedure() { public void value(Person person) { LOGGER.info(person.getName()); } });
forEach in interface com.gs.collections.api.InternalIterable<T>forEach in class AbstractMutableList<T>public void forEachWithIndex(com.gs.collections.api.block.procedure.primitive.ObjectIntProcedure<? super T> objectIntProcedure)
com.gs.collections.api.InternalIterablee.g. people.forEachWithIndex(new ObjectIntProcedure() { public void value(Person person, int index) { LOGGER.info("Index: " + index + " person: " + person.getName()); } });
forEachWithIndex in interface com.gs.collections.api.InternalIterable<T>forEachWithIndex in class AbstractMutableList<T>public <P> void forEachWith(com.gs.collections.api.block.procedure.Procedure2<? super T,? super P> procedure, P parameter)
com.gs.collections.api.InternalIterablee.g. people.forEachWith(new Procedure2() { public void value(Person person, Person other) { if (person.isRelatedTo(other)) { LOGGER.info(person.getName()); } } }, fred);
forEachWith in interface com.gs.collections.api.InternalIterable<T>forEachWith in class AbstractMutableList<T>