public class OneDimensionalArray<T> extends OneDimensionalReadAccess.Base<T> implements OneDimensionalAccess<T>
MutableIndexable.Base<TT>, MutableIndexable.ListView<T>OneDimensionalReadAccess.Base<TT>Indexable.IndexableSpliterator<TElem>EMPTYEMPTY_INDEXABLE_STRING| Constructor and Description |
|---|
OneDimensionalArray(java.util.Collection<T> elements)
Constructor.
|
OneDimensionalArray(Indexable<T> elements)
Constructor.
|
OneDimensionalArray(int size)
Constructor.
|
OneDimensionalArray(int size,
java.util.function.IntFunction<? extends T> filler)
Initializing Constructor.
|
OneDimensionalArray(java.lang.Iterable<T> elements)
Constructor.
|
OneDimensionalArray(T... elements)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
OneDimensionalAccess<T> |
copy()
Get an independent copy.
|
T |
get(int index)
Get the element at the given index.
|
void |
set(int index,
T elem)
Set the element at the given index.
|
int |
size()
Get the size.
|
asBaseequals, hashCode, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitchangeAll, changeAll, empty, fillByIndex, setElement, setElementAtapplyOnEach, asList, copy, copyInternally, copyOf, filled, fillFrom, fromArray, fromArray, fromIndexable, fromIndexable, fromIterable, getCopy, getCopy, headSet, init, initByIndex, initFragile, listIterator, nulled, order, reverse, revert, revert, setFrom, setFrom, setFromArray, setMulti, shuffle, subSet, swap, swyp, sybSet, syt, tailSet, viewArray, viewArray, viewIndexable, viewListchange, setAll, setFrom, setFrom, setFromasBase, getElement, getNumDimensions, getNumElements, getSize, getSizes, singleton, view, visitAll, visitAlladdToArray, addToArray, addToCollection, asCollection, binarySearch, checkIndex, combine, compare, downCast, emptyIndexable, equal, findAll, findAllX, findFirst, findFirst, findFirst, findFirstX, findLast, findLast, findLast, findNext, findNext, findNext, findNextX, findPrevious, findPrevious, findPrevious, first, firstMatch, firstMatch, firstMatchX, forEachEntry, forEachEntryFragile, fromCollection, fromCollection, fromCountable, fromCountable, fromEnumeration, fromEnumeration, fromIterable, fromIterable, fromIterable, fromIterable, fromIterator, fromList, fromOptional, frozenSpliterator, getMod, gyt, hash, indexedView, indexes, init, initByIndex, intIndexes, isEmpty, isOrdered, isStrictlyOrdered, iterator, iterator, last, mapArray, optional, ordered, rotated, spliterator, toString, view, view, viewAsBooleanIndexable, viewAsByteIndexable, viewAsCharIndexable, viewAsDict, viewAsDoubleIndexable, viewAsFloatIndexable, viewAsIntIndexable, viewAsLongIndexable, viewAsShortIndexable, viewByIndex, viewFragile, viewList, viewList, viewListN, viewListN, viewTuple, viewTuple, viewTuple, viewTuple, viewTuple, viewTuple, viewTuple, viewTuple, withAppendedItem, withCachedHash, withExchangedItemAt, withInsertedItemAt, withPrependedItem, withRemovedItemAt, withSwappedItemsAtaddAllTo, combined, combined, containsEq, containsRef, downCast, equal, equals, filtered, filteredToIndexable, filterToCountable, firstOrNull, foldLeft, forEachFragile, freeze, frozen, frozen, getAny, groupingBy, groupingBy, hasAll, hasAny, isSorted, isStrictlySorted, lastOrNull, mappingBy, mappingBy, optFirst, optLast, orderedCombination, parellelStream, sorted, stream, toArray, toArray, toList, toString, uniform, viewCollection, viewCollection, viewCollectionN, viewCollectionNempty, linearizedpublic OneDimensionalArray(@NotNull java.util.Collection<T> elements)
elements - elements of this arraypublic OneDimensionalArray(@NotNull Indexable<T> elements)
elements - elements of this arraypublic OneDimensionalArray(int size)
null.size - size of this arraypublic OneDimensionalArray(int size,
@NotNull
java.util.function.IntFunction<? extends T> filler)
size - size of this arrayfiller - filler which is called with for each element with its index
and expected to return the value at that index@SafeVarargs public OneDimensionalArray(@NotNull T... elements)
elements - elements of this array@NotNull public OneDimensionalAccess<T> copy()
OneDimensionalAccesscopy in interface OneDimensionalAccess<T>copy in interface OneDimensionalReadAccess<T>public void set(int index,
T elem)
MutableIndexableset in interface MutableIndexable<T>index - index between 0 and size() - 1elem - element to put to the given indexpublic int size()
Sizeable