@GenerateSubclass @Freezable(value=ReadOnlyArray.class) public abstract class FreezableArray<E> extends net.digitalid.utility.rootclass.RootClass implements ReadOnlyArray<E>, FreezableIterable<E>
freezable arrays.
It is recommended to use only ReadOnly or Immutable types for the elements.| Modifier | Constructor and Description |
|---|---|
protected |
FreezableArray(E... elements) |
protected |
FreezableArray(@NonNegative int size) |
protected |
FreezableArray(@NonNegative int size,
@Nonnull Iterable<? extends E> iterable) |
| Modifier and Type | Method and Description |
|---|---|
@Nonnull @NonFrozen FreezableArray<E> |
clone() |
boolean |
equals(@Nullable Object object) |
@Nonnull @Frozen ReadOnlyArray<E> |
freeze() |
E |
get(@Index int index) |
E |
getFirst(E defaultElement) |
E |
getLast(E defaultElement) |
int |
hashCode() |
boolean |
isFrozen() |
@Nonnull net.digitalid.utility.functional.iterators.ReadOnlyArrayIterator<E> |
iterator() |
void |
set(@Index int index,
E element)
Sets the element at the given index to the given element.
|
@Nonnull @NonFrozen FreezableArray<E> |
setAll(E element)
Sets each element of this array to the given element.
|
@NonNegative int |
size() |
E[] |
toArray() |
@Nonnull String |
toString() |
static <E> @NonFrozen FreezableArray<E> |
withElements(E... elements)
Returns a new freezable array with the given elements or null if the given array is null.
|
static <E> @NonFrozen FreezableArray<E> |
withElementsOf(Collection<? extends E> collection)
Returns a new freezable array with the elements of the given collection or null if the given collection is null.
|
static <E> @NonFrozen FreezableArray<E> |
withElementsOf(net.digitalid.utility.functional.iterables.FiniteIterable<? extends E> iterable)
Returns a new freezable array with the elements of the given iterable or null if the given iterable is null.
|
static <E> @NonFrozen FreezableArray<E> |
withElementsOf(FreezableCollection<? extends E> collection)
Returns a new freezable array with the elements of the given freezable collection or null if the given collection is null.
|
static <E> @Nonnull @NonFrozen FreezableArray<E> |
withSize(@NonNegative int size)
Returns a new freezable array with the given size.
|
finalize, getClass, notify, notifyAll, wait, wait, waitcontainsAlltoFreezableArray, toFreezableList, toFreezableMap, toFreezableSetisEmpty, sizeaverage, collect, combine, combine, contains, containsAll, containsAll, containsDuplicates, containsNull, count, distinct, doForEach, equals, evaluate, exclude, filter, filterNot, filterNulls, findFirst, findFirst, findLast, findLast, findUnique, flatten, flattenAll, flattenOne, getFirst, getFirstOrNull, getLast, getLastOrNull, groupBy, indexOf, instanceOf, intersect, isAscending, isDescending, isEmptyOrSingle, isOrdered, isSingle, isStrictlyAscending, isStrictlyDescending, join, join, join, join, join, join, join, join, lastIndexOf, map, matchAll, matchAny, matchNone, max, max, max, max, min, min, min, min, of, of, reduce, reduce, repeated, reversed, skip, sorted, sorted, sumAsDouble, sumAsLong, toArray, toGenericArray, toList, toMap, toSet, zipLongest, zipShortestextract, hasSize, limit, sizeAtLeast, sizeAtMost, zipLongest, zipShortestforEach, spliteratorprotected FreezableArray(@NonNegative
@NonNegative int size)
@SafeVarargs protected FreezableArray(@NonCaptured @Unmodified @Nonnull E... elements)
@Pure @Capturable @Nonnull @NonFrozen public static <E> @Nonnull @NonFrozen FreezableArray<E> withSize(@NonNegative @NonNegative int size)
@Pure @SafeVarargs @Capturable @NonFrozen public static <E> @NonFrozen FreezableArray<E> withElements(@NonCaptured @Unmodified E... elements)
@Pure @Capturable @NonFrozen public static <E> @NonFrozen FreezableArray<E> withElementsOf(net.digitalid.utility.functional.iterables.FiniteIterable<? extends E> iterable)
@Pure @Capturable @NonFrozen public static <E> @NonFrozen FreezableArray<E> withElementsOf(@NonCaptured @Unmodified Collection<? extends E> collection)
@Pure @Capturable @NonFrozen public static <E> @NonFrozen FreezableArray<E> withElementsOf(@NonCaptured @Unmodified FreezableCollection<? extends E> collection)
@Pure
@TODO(task="Generate this implementation.",
date="2016-04-06",
author=KASPAR_ETTER,
assignee=STEPHANIE_STROKA,
priority=MIDDLE)
public boolean isFrozen()
isFrozen in interface net.digitalid.utility.freezable.ReadOnlyInterface@Impure
@NonFrozenRecipient
@TODO(task="Generate this implementation.",
date="2016-04-06",
author=KASPAR_ETTER,
assignee=STEPHANIE_STROKA,
priority=MIDDLE)
@Chainable
@Nonnull
@Frozen
public @Nonnull @Frozen ReadOnlyArray<E> freeze()
freeze in interface FreezableIterable<E>freeze in interface net.digitalid.utility.freezable.FreezableInterface@Pure @NonNegative public @NonNegative int size()
@Pure @Nullable public E get(@Index @Index int index)
get in interface net.digitalid.utility.functional.iterables.FunctionalIterable<E>@Pure @Capturable @Nonnull public @Nonnull net.digitalid.utility.functional.iterators.ReadOnlyArrayIterator<E> iterator()
@Pure @NonCapturable public E getFirst(@NonCaptured @Unmodified E defaultElement)
getFirst in interface net.digitalid.utility.functional.iterables.FiniteIterable<E>@Pure @NonCapturable public E getLast(@NonCaptured @Unmodified E defaultElement)
getLast in interface net.digitalid.utility.functional.iterables.FiniteIterable<E>@Impure
@NonFrozenRecipient
public void set(@Index
@Index int index,
E element)
@Impure @NonFrozenRecipient @Chainable @Nonnull @NonFrozen public @Nonnull @NonFrozen FreezableArray<E> setAll(E element)
@Pure @Capturable @Nonnull public E[] toArray()
toArray in interface net.digitalid.utility.functional.iterables.FiniteIterable<E>@Pure @Capturable @Nonnull @NonFrozen public @Nonnull @NonFrozen FreezableArray<E> clone()
clone in interface ReadOnlyArray<E>clone in interface ReadOnlyIterable<E>clone in interface net.digitalid.utility.freezable.ReadOnlyInterfaceclone in class Object@Pure public boolean equals(@Nullable @Nullable Object object)
equals in interface net.digitalid.utility.rootclass.RootInterfaceequals in class net.digitalid.utility.rootclass.RootClassWithException<RuntimeException>@Pure public int hashCode()
hashCode in interface net.digitalid.utility.rootclass.RootInterfacehashCode in class net.digitalid.utility.rootclass.RootClassWithException<RuntimeException>@Pure @Nonnull public @Nonnull String toString()
toString in interface net.digitalid.utility.rootclass.RootInterfacetoString in class net.digitalid.utility.rootclass.RootClassWithException<RuntimeException>Copyright © 2017. All rights reserved.