@GenerateSubclass @Freezable(value=ReadOnlyList.class) public abstract class FreezableLinkedList<E> extends LinkedList<E> implements FreezableList<E>
LinkedList and makes it freezable.
It is recommended to use only ReadOnly or Immutable types for the elements.modCount| Modifier | Constructor and Description |
|---|---|
protected |
FreezableLinkedList() |
protected |
FreezableLinkedList(@Nonnull Iterable<? extends E> iterable) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(E element) |
void |
add(@IndexForInsertion int index,
E element) |
boolean |
addAll(@Nonnull Collection<? extends E> collection) |
boolean |
addAll(@IndexForInsertion int index,
@Nonnull Collection<? extends E> collection) |
void |
addFirst(E element) |
void |
addLast(E element) |
void |
clear() |
@Nonnull @NonFrozen FreezableLinkedList<E> |
clone() |
@Nonnull net.digitalid.utility.functional.iterators.ReadOnlyIterator<E> |
descendingIterator() |
@Nonnull FreezableIterator<E> |
freezableIterator()
Returns a freezable iterator over the elements in this collection.
|
@Nonnull @Frozen ReadOnlyList<E> |
freeze() |
E |
get(@Index int index) |
boolean |
isFrozen() |
@Nonnull net.digitalid.utility.functional.iterators.ReadOnlyIterator<E> |
iterator() |
@Nonnull net.digitalid.utility.functional.iterators.ReadOnlyListIterator<E> |
listIterator() |
@Nonnull net.digitalid.utility.functional.iterators.ReadOnlyListIterator<E> |
listIterator(@IndexForInsertion int index) |
boolean |
offer(E element) |
boolean |
offerFirst(E element) |
boolean |
offerLast(E element) |
E |
poll() |
E |
pollFirst() |
E |
pollLast() |
E |
pop() |
void |
push(E element) |
E |
remove() |
E |
remove(@Index int index) |
boolean |
remove(@Nullable Object object) |
boolean |
removeAll(@Nonnull Collection<?> collection)
Removes the elements of the given collection from this collection.
|
E |
removeFirst() |
boolean |
removeFirstOccurrence(@Nullable Object object) |
E |
removeLast() |
boolean |
removeLastOccurrence(@Nullable Object object) |
protected void |
removeRange(@Index int fromIndex,
@IndexForInsertion int toIndex) |
boolean |
retainAll(@Nonnull Collection<?> collection)
Retains the elements of the given collection and removes all other.
|
E |
set(@Index int index,
E element) |
@Nonnull FreezableList<E> |
subList(@Index int fromIndex,
@IndexForInsertion int toIndex) |
static <E> @Nonnull @NonFrozen FreezableLinkedList<E> |
withElement(E element)
Returns a new freezable linked list with the given element.
|
static <E> @NonFrozen FreezableLinkedList<E> |
withElements(E... elements)
Returns a new freezable linked list with the given elements or null if the given array is null.
|
static <E> @NonFrozen FreezableLinkedList<E> |
withElementsOf(Collection<? extends E> collection)
Returns a new freezable linked list with the elements of the given collection or null if the given collection is null.
|
static <E> @NonFrozen FreezableLinkedList<E> |
withElementsOf(net.digitalid.utility.functional.iterables.FiniteIterable<? extends E> iterable)
Returns a new freezable linked list with the elements of the given iterable or null if the given iterable is null.
|
static <E> @NonFrozen FreezableLinkedList<E> |
withElementsOf(FreezableCollection<? extends E> collection)
Returns a new freezable linked list with the elements of the given freezable collection or null if the given collection is null.
|
static <E> @Nonnull @NonFrozen FreezableLinkedList<E> |
withNoElements()
Returns a new freezable linked list with no elements.
|
contains, element, getFirst, getLast, indexOf, lastIndexOf, peek, peekFirst, peekLast, size, spliterator, toArray, toArrayequals, hashCodecontainsAll, isEmpty, toStringfinalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcontains, containsAll, indexOf, isEmpty, lastIndexOf, toArray, toArraywithequals, hashCode, replaceAll, size, sort, spliteratoraddAll, addAll, removeAll, removeAll, retainAll, retainAllparallelStream, removeIf, streamcontainsAlltoFreezableArray, toFreezableList, toFreezableMap, toFreezableSetsize, sizeaverage, collect, combine, combine, containsAll, containsDuplicates, containsNull, count, distinct, doForEach, equals, evaluate, exclude, filter, filterNot, filterNulls, findFirst, findFirst, findLast, findLast, findUnique, flatten, flattenAll, flattenOne, getFirst, getFirst, getFirstOrNull, getLast, getLast, getLastOrNull, groupBy, instanceOf, intersect, isAscending, isDescending, isEmptyOrSingle, isOrdered, isSingle, isStrictlyAscending, isStrictlyDescending, join, join, join, join, join, join, join, join, map, matchAll, matchAny, matchNone, max, max, max, max, min, min, min, min, of, of, reduce, reduce, repeated, reversed, skip, sorted, sorted, sumAsDouble, sumAsLong, toGenericArray, toList, toMap, toSet, zipLongest, zipShortestextract, hasSize, limit, sizeAtLeast, sizeAtMost, zipLongest, zipShortest@Pure @Capturable @Nonnull @NonFrozen public static <E> @Nonnull @NonFrozen FreezableLinkedList<E> withNoElements()
@Pure @Capturable @Nonnull @NonFrozen public static <E> @Nonnull @NonFrozen FreezableLinkedList<E> withElement(@Captured E element)
@Pure @SafeVarargs @Capturable @NonFrozen public static <E> @NonFrozen FreezableLinkedList<E> withElements(@NonCaptured @Unmodified E... elements)
@Pure @Capturable @NonFrozen public static <E> @NonFrozen FreezableLinkedList<E> withElementsOf(net.digitalid.utility.functional.iterables.FiniteIterable<? extends E> iterable)
@Pure @Capturable @NonFrozen public static <E> @NonFrozen FreezableLinkedList<E> withElementsOf(@NonCaptured @Unmodified Collection<? extends E> collection)
@Pure @Capturable @NonFrozen public static <E> @NonFrozen FreezableLinkedList<E> withElementsOf(@NonCaptured @Unmodified FreezableCollection<? extends E> collection)
@Pure public boolean isFrozen()
isFrozen in interface net.digitalid.utility.freezable.ReadOnlyInterface@Impure @NonFrozenRecipient @Nonnull @Frozen public @Nonnull @Frozen ReadOnlyList<E> freeze()
freeze in interface FreezableCollection<E>freeze in interface FreezableIterable<E>freeze in interface FreezableList<E>freeze in interface net.digitalid.utility.freezable.FreezableInterface@Pure @Capturable @Nonnull @NonFrozen public @Nonnull @NonFrozen FreezableLinkedList<E> clone()
clone in interface ReadOnlyCollection<E>clone in interface ReadOnlyIterable<E>clone in interface ReadOnlyList<E>clone in interface net.digitalid.utility.freezable.ReadOnlyInterfaceclone in class LinkedList<E>@Pure @NonCapturable public E get(@Index @Index int index)
get in interface List<E>get in interface FreezableList<E>get in interface net.digitalid.utility.functional.iterables.FunctionalIterable<E>get in class LinkedList<E>@Pure @Capturable @Nonnull public @Nonnull net.digitalid.utility.functional.iterators.ReadOnlyIterator<E> iterator()
iterator in interface Iterable<E>iterator in interface Collection<E>iterator in interface Deque<E>iterator in interface List<E>iterator in interface net.digitalid.utility.functional.iterables.FunctionalIterable<E>iterator in class AbstractSequentialList<E>@Pure @Capturable @Nonnull public @Nonnull FreezableIterator<E> freezableIterator()
FreezableCollectionfreezableIterator in interface FreezableCollection<E>@Pure @Capturable @Nonnull public @Nonnull net.digitalid.utility.functional.iterators.ReadOnlyIterator<E> descendingIterator()
descendingIterator in interface Deque<E>descendingIterator in class LinkedList<E>@Pure @Capturable @Nonnull public @Nonnull net.digitalid.utility.functional.iterators.ReadOnlyListIterator<E> listIterator()
listIterator in interface List<E>listIterator in interface ReadOnlyList<E>listIterator in class AbstractList<E>List.listIterator()@Pure @Capturable @Nonnull public @Nonnull net.digitalid.utility.functional.iterators.ReadOnlyListIterator<E> listIterator(@IndexForInsertion @IndexForInsertion int index)
listIterator in interface List<E>listIterator in interface ReadOnlyList<E>listIterator in class LinkedList<E>List.listIterator(int)@Pure @NonCapturable @Nonnull public @Nonnull FreezableList<E> subList(@Index @Index int fromIndex, @IndexForInsertion @IndexForInsertion int toIndex)
subList in interface List<E>subList in interface FreezableList<E>subList in interface ReadOnlyList<E>subList in class AbstractList<E>List.subList(int, int)@Impure
@NonFrozenRecipient
public boolean add(@Captured
E element)
@Impure
@NonFrozenRecipient
public void add(@IndexForInsertion
@IndexForInsertion int index,
@Captured
E element)
@Impure
@NonFrozenRecipient
public void addFirst(@Captured
E element)
@Impure
@NonFrozenRecipient
public void addLast(@Captured
E element)
@Impure @NonFrozenRecipient public boolean addAll(@NonCaptured @Unmodified @Nonnull @Nonnull Collection<? extends E> collection)
addAll in interface Collection<E>addAll in interface List<E>addAll in class LinkedList<E>@Impure
@NonFrozenRecipient
public boolean addAll(@IndexForInsertion
@IndexForInsertion int index,
@NonCaptured @Unmodified @Nonnull
@Nonnull Collection<? extends E> collection)
@Impure
@NonFrozenRecipient
public boolean offer(@Captured
E element)
@Impure
@NonFrozenRecipient
public boolean offerFirst(@Captured
E element)
offerFirst in interface Deque<E>offerFirst in class LinkedList<E>@Impure
@NonFrozenRecipient
public boolean offerLast(@Captured
E element)
@Impure @NonFrozenRecipient @Capturable public E remove()
@Impure @NonFrozenRecipient @Capturable public E removeFirst()
removeFirst in interface Deque<E>removeFirst in class LinkedList<E>@Impure @NonFrozenRecipient @Capturable public E removeLast()
removeLast in interface Deque<E>removeLast in class LinkedList<E>@Impure @NonFrozenRecipient @Capturable public E remove(@Index @Index int index)
@Impure @NonFrozenRecipient public boolean remove(@NonCaptured @Unmodified @Nullable @Nullable Object object)
@Impure @NonFrozenRecipient public boolean removeFirstOccurrence(@NonCaptured @Unmodified @Nullable @Nullable Object object)
removeFirstOccurrence in interface Deque<E>removeFirstOccurrence in class LinkedList<E>@Impure @NonFrozenRecipient public boolean removeLastOccurrence(@NonCaptured @Unmodified @Nullable @Nullable Object object)
removeLastOccurrence in interface Deque<E>removeLastOccurrence in class LinkedList<E>@Impure
@NonFrozenRecipient
protected void removeRange(@Index
@Index int fromIndex,
@IndexForInsertion
@IndexForInsertion int toIndex)
removeRange in class AbstractList<E>@Impure @NonFrozenRecipient public boolean removeAll(@NonCaptured @Unmodified @Nonnull @Nonnull Collection<?> collection)
FreezableCollectionremoveAll in interface Collection<E>removeAll in interface List<E>removeAll in interface FreezableCollection<E>removeAll in interface FreezableList<E>removeAll in class AbstractCollection<E>@Impure @NonFrozenRecipient @Capturable public E poll()
@Impure @NonFrozenRecipient @Capturable public E pollFirst()
@Impure @NonFrozenRecipient @Capturable public E pollLast()
@Impure
@NonFrozenRecipient
public void push(@Captured
E element)
@Impure @NonFrozenRecipient @Capturable public E pop()
@Impure @NonFrozenRecipient @Nullable public E set(@Index @Index int index, @Captured E element)
@Impure @NonFrozenRecipient public void clear()
clear in interface Collection<E>clear in interface List<E>clear in class LinkedList<E>@Impure @NonFrozenRecipient public boolean retainAll(@NonCaptured @Unmodified @Nonnull @Nonnull Collection<?> collection)
FreezableCollectionretainAll in interface Collection<E>retainAll in interface List<E>retainAll in interface FreezableCollection<E>retainAll in interface FreezableList<E>retainAll in class AbstractCollection<E>Copyright © 2017. All rights reserved.