java.lang.Cloneable, java.lang.Iterable<T>, java.util.Collection<T>, java.util.List<T>, java.util.RandomAccess, FixedSizeCollection<T>, MutableCollection<T>, InternalIterable<T>, FixedSizeList<T>, ListIterable<T>, MutableList<T>, OrderedIterable<T>, ReversibleIterable<T>, RichIterable<T>public abstract class AbstractMemoryEfficientMutableList<T> extends AbstractMutableList<T> implements FixedSizeList<T>, java.util.RandomAccess
| Constructor | Description |
|---|---|
AbstractMemoryEfficientMutableList() |
| Modifier and Type | Method | Description |
|---|---|---|
void |
add(int index,
T element) |
|
boolean |
add(T o) |
|
boolean |
addAll(int index,
java.util.Collection<? extends T> collection) |
|
boolean |
addAll(java.util.Collection<? extends T> collection) |
|
boolean |
addAllIterable(java.lang.Iterable<? extends T> iterable) |
|
void |
clear() |
|
FixedSizeList<T> |
clone() |
|
java.util.ListIterator<T> |
listIterator() |
|
java.util.ListIterator<T> |
listIterator(int index) |
|
T |
remove(int index) |
|
boolean |
remove(java.lang.Object o) |
|
boolean |
removeAll(java.util.Collection<?> collection) |
|
boolean |
removeAllIterable(java.lang.Iterable<?> iterable) |
|
boolean |
removeIf(Predicate<? super T> predicate) |
Removes all elements in the collection that evaluate to true for the specified predicate.
|
<P> boolean |
removeIfWith(Predicate2<? super T,? super P> predicate,
P parameter) |
Removes all elements in the collection that evaluate to true for the specified predicate2 and parameter.
|
boolean |
retainAll(java.util.Collection<?> collection) |
|
boolean |
retainAllIterable(java.lang.Iterable<?> iterable) |
|
MutableList<T> |
subList(int fromIndex,
int toIndex) |
|
FixedSizeList<T> |
tap(Procedure<? super T> procedure) |
Executes the Procedure for each element in the iterable and returns
this. |
FixedSizeList<T> |
toReversed() |
Returns a new MutableList in reverse order.
|
MutableList<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.
|
MutableList<T> |
without(T element) |
This method allows mutable and fixed size collections the ability to remove elements from their existing elements.
|
MutableList<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.
|
aggregateBy, aggregateInPlaceBy, countBy, countByWith, reduce, sumByDouble, sumByFloat, sumByInt, sumByLongallSatisfy, allSatisfyWith, anySatisfy, anySatisfyWith, appendString, appendString, asParallel, asReversed, asSynchronized, asUnmodifiable, binarySearch, chunk, collect, collect, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectIf, collectIf, collectInt, collectLong, collectShort, collectWith, collectWith, contains, containsAll, corresponds, count, countWith, detect, detectIndex, detectLastIndex, detectOptional, detectWith, detectWithOptional, distinct, distinct, distinctBy, drop, dropWhile, each, equals, flatCollect, flatCollect, forEach, forEachWith, forEachWithIndex, forEachWithIndex, getFirst, getLast, groupBy, groupByEach, groupByUniqueKey, hashCode, indexOf, injectInto, injectInto, injectInto, injectInto, injectIntoWith, iterator, lastIndexOf, max, max, maxBy, min, min, minBy, newEmpty, noneSatisfy, noneSatisfyWith, partition, partitionWhile, partitionWith, reject, reject, rejectWith, rejectWith, reverseForEach, reverseForEachWithIndex, reverseThis, select, select, selectAndRejectWith, selectInstancesOf, selectWith, selectWith, shuffleThis, shuffleThis, sortThis, sortThis, sortThisBy, sortThisByBoolean, sortThisByByte, sortThisByChar, sortThisByDouble, sortThisByFloat, sortThisByInt, sortThisByLong, sortThisByShort, sumOfDouble, sumOfFloat, sumOfInt, sumOfLong, take, takeWhile, toImmutable, toList, toSet, toSortedList, toSortedList, toStack, with, zip, zip, zipWithIndex, zipWithIndexasLazy, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectInt, collectLong, collectShort, containsAllArguments, containsAllIterable, detectWithIfNone, forEach, groupBy, groupByEach, groupByUniqueKey, injectInto, into, isEmpty, toArray, toArray, toBag, toMap, toSortedBag, toSortedBag, toSortedBagBy, toSortedListBy, toSortedMap, toSortedMap, toSortedMapBy, toSortedSet, toSortedSet, toSortedSetBy, toStringwithforEach, forEachWithcontains, containsAll, equals, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, of, of, of, of, of, of, of, of, of, of, of, of, replaceAll, set, size, sort, spliterator, toArray, toArrayasParallel, binarySearch, binarySearch, equals, get, getFirst, getLast, hashCode, lastIndexOf, toStackaggregateBy, aggregateInPlaceBy, countBy, countByWith, groupByUniqueKey, injectIntoWith, selectAndRejectWith, sumByDouble, sumByFloat, sumByInt, sumByLongasSynchronized, asUnmodifiable, collect, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectIf, collectInt, collectLong, collectShort, collectWith, collectWithIndex, distinct, distinct, distinctBy, drop, dropWhile, flatCollect, flatCollectWith, groupBy, groupByEach, newEmpty, partition, partitionWhile, partitionWith, reject, rejectWith, reverseThis, select, selectInstancesOf, selectWith, shuffleThis, shuffleThis, sortThis, sortThis, sortThisBy, sortThisByBoolean, sortThisByByte, sortThisByChar, sortThisByDouble, sortThisByFloat, sortThisByInt, sortThisByLong, sortThisByShort, take, takeWhile, toImmutable, with, zip, zipWithIndexcollectWithIndex, corresponds, detectIndex, forEach, forEachWithIndex, forEachWithIndex, getFirstOptional, getLastOptional, indexOfasReversed, detectLastIndex, reverseForEach, reverseForEachWithIndexallSatisfy, allSatisfyWith, anySatisfy, anySatisfyWith, appendString, appendString, appendString, asLazy, chunk, collect, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectIf, collectInt, collectLong, collectShort, collectWith, contains, containsAll, containsAllArguments, containsAllIterable, count, countBy, countByWith, countWith, detect, detectIfNone, detectOptional, detectWith, detectWithIfNone, detectWithOptional, each, flatCollect, flatCollectWith, getOnly, groupBy, groupByEach, groupByUniqueKey, injectInto, injectInto, injectInto, injectInto, injectInto, into, isEmpty, makeString, makeString, makeString, max, maxBy, maxByOptional, maxOptional, maxOptional, min, minBy, minByOptional, minOptional, minOptional, noneSatisfy, noneSatisfyWith, notEmpty, reduce, reduceInPlace, reduceInPlace, reject, rejectWith, select, selectWith, size, summarizeDouble, summarizeFloat, summarizeInt, summarizeLong, sumOfDouble, sumOfFloat, sumOfInt, sumOfLong, toArray, toArray, toBag, toList, toMap, toSet, toSortedBag, toSortedBag, toSortedBagBy, toSortedList, toSortedList, toSortedListBy, toSortedMap, toSortedMap, toSortedMapBy, toSortedSet, toSortedSet, toSortedSetBy, toStringpublic FixedSizeList<T> clone()
clone in interface MutableList<T>clone in class AbstractMutableList<T>public FixedSizeList<T> tap(Procedure<? super T> procedure)
RichIterablethis.
Example using a Java 8 lambda expression:
RichIterable<Person> tapped =
people.tap(person -> LOGGER.info(person.getName()));
Example using an anonymous inner class:
RichIterable<Person> tapped =
people.tap(new Procedure<Person>()
{
public void value(Person person)
{
LOGGER.info(person.getName());
}
});
tap in interface FixedSizeCollection<T>tap in interface FixedSizeList<T>tap in interface ListIterable<T>tap in interface MutableCollection<T>tap in interface MutableList<T>tap in interface OrderedIterable<T>tap in interface ReversibleIterable<T>tap in interface RichIterable<T>tap in class AbstractMutableList<T>RichIterable.each(Procedure),
InternalIterable.forEach(Procedure)public boolean add(T o)
add in interface java.util.Collection<T>add in interface FixedSizeCollection<T>add in interface java.util.List<T>add in class AbstractMutableCollection<T>public boolean addAll(java.util.Collection<? extends T> collection)
addAll in interface java.util.Collection<T>addAll in interface FixedSizeCollection<T>addAll in interface java.util.List<T>addAll in class AbstractMutableCollection<T>public boolean addAll(int index,
java.util.Collection<? extends T> collection)
addAll in interface java.util.List<T>public boolean addAllIterable(java.lang.Iterable<? extends T> iterable)
addAllIterable in interface FixedSizeCollection<T>addAllIterable in interface MutableCollection<T>addAllIterable in class AbstractMutableCollection<T>Collection.addAll(Collection)public boolean remove(java.lang.Object o)
remove in interface java.util.Collection<T>remove in interface FixedSizeCollection<T>remove in interface java.util.List<T>remove in class AbstractMutableCollection<T>public boolean removeAll(java.util.Collection<?> collection)
removeAll in interface java.util.Collection<T>removeAll in interface FixedSizeCollection<T>removeAll in interface java.util.List<T>removeAll in class AbstractMutableList<T>public boolean removeAllIterable(java.lang.Iterable<?> iterable)
removeAllIterable in interface FixedSizeCollection<T>removeAllIterable in interface MutableCollection<T>removeAllIterable in class AbstractMutableCollection<T>Collection.removeAll(Collection)public boolean removeIf(Predicate<? super T> predicate)
MutableCollection
e.g. return lastNames.removeIf(Predicates.isNull());
removeIf in interface FixedSizeCollection<T>removeIf in interface MutableCollection<T>removeIf in class AbstractMutableList<T>public <P> boolean removeIfWith(Predicate2<? super T,? super P> predicate, P parameter)
MutableCollection
return lastNames.removeIfWith(Predicates2.isNull(), null);
removeIfWith in interface FixedSizeCollection<T>removeIfWith in interface MutableCollection<T>removeIfWith in class AbstractMutableList<T>public boolean retainAll(java.util.Collection<?> collection)
retainAll in interface java.util.Collection<T>retainAll in interface FixedSizeCollection<T>retainAll in interface java.util.List<T>retainAll in class AbstractMutableList<T>public boolean retainAllIterable(java.lang.Iterable<?> iterable)
retainAllIterable in interface FixedSizeCollection<T>retainAllIterable in interface MutableCollection<T>retainAllIterable in class AbstractMutableCollection<T>Collection.retainAll(Collection)public void clear()
clear in interface java.util.Collection<T>clear in interface FixedSizeCollection<T>clear in interface java.util.List<T>public FixedSizeList<T> toReversed()
MutableListtoReversed in interface FixedSizeList<T>toReversed in interface ListIterable<T>toReversed in interface MutableList<T>toReversed in interface ReversibleIterable<T>toReversed in class AbstractMutableList<T>public MutableList<T> subList(int fromIndex, int toIndex)
subList in interface java.util.List<T>subList in interface ListIterable<T>subList in interface MutableList<T>subList in class AbstractMutableList<T>List.subList(int, int)public MutableList<T> without(T element)
MutableCollection
MutableCollection<String> list = list.without("1");
list = list.without("2");
return list;
In the case of 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 FixedSizeCollection<T>without in interface MutableCollection<T>without in interface MutableList<T>without in class AbstractMutableList<T>Collection.remove(Object)public MutableList<T> withAll(java.lang.Iterable<? extends T> elements)
MutableCollection
MutableCollection<String> list = list.withAll(FastList.newListWith("1", "2"));
In the case of 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 FixedSizeCollection<T>withAll in interface MutableCollection<T>withAll in interface MutableList<T>withAll in class AbstractMutableList<T>Collection.addAll(Collection)public MutableList<T> withoutAll(java.lang.Iterable<? extends T> elements)
MutableCollection
MutableCollection<String> list = list.withoutAll(FastList.newListWith("1", "2"));
In the case of 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 FixedSizeCollection<T>withoutAll in interface MutableCollection<T>withoutAll in interface MutableList<T>withoutAll in class AbstractMutableList<T>Collection.removeAll(Collection)public java.util.ListIterator<T> listIterator(int index)
listIterator in interface java.util.List<T>listIterator in interface ListIterable<T>listIterator in class AbstractMutableList<T>List.listIterator(int)public java.util.ListIterator<T> listIterator()
listIterator in interface java.util.List<T>listIterator in interface ListIterable<T>listIterator in class AbstractMutableList<T>List.listIterator()Copyright © 2004–2018. All rights reserved.