Cloneable, Iterable<T>, Collection<T>, List<T>, 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>, RandomAccess
| Constructor | Description |
|---|---|
AbstractMemoryEfficientMutableList() |
| Modifier and Type | Method | Description |
|---|---|---|
void |
add(int index,
T element) |
|
boolean |
add(T o) |
|
boolean |
addAll(int index,
Collection<? extends T> collection) |
|
boolean |
addAll(Collection<? extends T> collection) |
|
boolean |
addAllIterable(Iterable<? extends T> iterable) |
|
void |
clear() |
|
FixedSizeList<T> |
clone() |
|
ListIterator<T> |
listIterator() |
|
ListIterator<T> |
listIterator(int index) |
|
T |
remove(int index) |
|
boolean |
remove(Object o) |
|
boolean |
removeAll(Collection<?> collection) |
|
boolean |
removeAllIterable(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(Collection<?> collection) |
|
boolean |
retainAllIterable(Iterable<?> iterable) |
|
void |
sort(Comparator<? super T> comparator) |
This method checks if comparator is null and use a ComparableComparator if it is.
|
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(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(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, countByEach, countByWith, reduce, sumByDouble, sumByFloat, sumByInt, sumByLongallSatisfy, allSatisfyWith, anySatisfy, anySatisfyWith, appendString, appendString, asParallel, asReversed, asSynchronized, asUnmodifiable, binarySearch, chunk, collect, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectIf, collectInt, collectLong, collectShort, collectWith, contains, containsAll, corresponds, count, countWith, detect, detectIndex, detectLastIndex, detectOptional, detectWith, detectWithOptional, distinct, distinct, distinctBy, drop, dropWhile, each, equals, 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, rejectWith, select, selectAndRejectWith, selectInstancesOf, selectWith, sortThisBy, sortThisByBoolean, sortThisByByte, sortThisByChar, sortThisByDouble, sortThisByFloat, sortThisByInt, sortThisByLong, sortThisByShort, sumOfDouble, sumOfFloat, sumOfInt, sumOfLong, take, takeWhile, toSet, 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, toBiMap, toList, toMap, toSortedBag, toSortedBag, toSortedBagBy, toSortedListBy, toSortedMap, toSortedMap, toSortedMapBy, toSortedSet, toSortedSet, toSortedSetBy, toStringparallelStream, removeIf, streamwithforEachWithcontains, containsAll, equals, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, of, of, of, of, of, of, of, of, of, of, of, of, replaceAll, set, size, spliterator, toArray, toArrayasParallel, binarySearch, binarySearch, equals, get, getFirst, getLast, hashCode, lastIndexOf, toStackaggregateBy, aggregateInPlaceBy, countBy, countByEach, 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, countByEach, countByWith, countWith, detect, detectIfNone, detectOptional, detectWith, detectWithIfNone, detectWithOptional, each, flatCollect, flatCollectWith, getAny, 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, toBiMap, toList, toMap, 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),
RichIterable.forEach(Procedure)public boolean add(T o)
add in interface Collection<T>add in interface FixedSizeCollection<T>add in interface List<T>add in class AbstractMutableCollection<T>public boolean addAll(Collection<? extends T> collection)
addAll in interface Collection<T>addAll in interface FixedSizeCollection<T>addAll in interface List<T>addAll in class AbstractMutableCollection<T>public boolean addAll(int index,
Collection<? extends T> collection)
public boolean addAllIterable(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(Object o)
remove in interface Collection<T>remove in interface FixedSizeCollection<T>remove in interface List<T>remove in class AbstractMutableCollection<T>public boolean removeAll(Collection<?> collection)
removeAll in interface Collection<T>removeAll in interface FixedSizeCollection<T>removeAll in interface List<T>removeAll in class AbstractMutableList<T>public boolean removeAllIterable(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(Collection<?> collection)
retainAll in interface Collection<T>retainAll in interface FixedSizeCollection<T>retainAll in interface List<T>retainAll in class AbstractMutableList<T>public boolean retainAllIterable(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 Collection<T>clear in interface FixedSizeCollection<T>clear in interface List<T>public void sort(Comparator<? super T> comparator)
public FixedSizeList<T> toReversed()
MutableListtoReversed in interface FixedSizeList<T>toReversed in interface ListIterable<T>toReversed in interface MutableList<T>toReversed in interface ReversibleIterable<T>public MutableList<T> subList(int fromIndex, int toIndex)
subList in interface 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(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(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 ListIterator<T> listIterator(int index)
listIterator in interface List<T>listIterator in interface ListIterable<T>listIterator in class AbstractMutableList<T>List.listIterator(int)public ListIterator<T> listIterator()
listIterator in interface List<T>listIterator in interface ListIterable<T>listIterator in class AbstractMutableList<T>List.listIterator()Copyright © 2004–2019. All rights reserved.