Uses of Interface
org.javimmutable.collections.common.ArrayHelper.Allocator
Packages that use ArrayHelper.Allocator
-
Uses of ArrayHelper.Allocator in org.javimmutable.collections.common
Methods in org.javimmutable.collections.common that return ArrayHelper.AllocatorModifier and TypeMethodDescriptionstatic <T> ArrayHelper.Allocator
<T> Creates an Allocator for arrays of the given class.Methods in org.javimmutable.collections.common with parameters of type ArrayHelper.AllocatorModifier and TypeMethodDescriptionstatic <T> T[]
ArrayHelper.append
(ArrayHelper.Allocator<T> allocator, T[] orig, T value) Creates a copy of orig with one extra value added at the end.static <T> T[]
ArrayHelper.assignAppend
(ArrayHelper.Allocator<T> allocator, T[] orig, T assignValue, T appendValue) Replace the last value in orig (which cannot be empty) with assignValue and also append appendValue to the end.static <T> T[]
ArrayHelper.assignDelete
(ArrayHelper.Allocator<T> allocator, T[] orig, int index, T newNode) Deletes the node at index and sets the value of the resulting array at index to newNode.static <T> T[]
ArrayHelper.assignInsert
(ArrayHelper.Allocator<T> allocator, T[] orig, int index, T assignValue, T insertValue) Replace the value at index with assignValue and insert insertValue immediately at index + 1.static <T> T[]
ArrayHelper.concat
(ArrayHelper.Allocator<T> allocator, T[] a, T[] b) Creates a new array containing all the values of a followed by all the values of b.static <T> T[]
ArrayHelper.delete
(ArrayHelper.Allocator<T> allocator, T[] orig, int index) Creates a copy of orig with one value deleted at index.static <T> T[]
ArrayHelper.insert
(ArrayHelper.Allocator<T> allocator, T[] orig, int index, T value) Creates a copy of orig with one extra value inserted at index.static <T> T[]
ArrayHelper.prefix
(ArrayHelper.Allocator<T> allocator, T[] orig, int limit) Returns a copy of orig containing of length limit containing all values from [0,limit).static <T> T[]
ArrayHelper.prefixInsert
(ArrayHelper.Allocator<T> allocator, T[] orig, int limit, int index, T value) Returns a copy of orig containing of length limit+1 containing all values from [0,limit) but with value inserted at index and values after that shifted to the right.static <T> T[]
ArrayHelper.reverse
(ArrayHelper.Allocator<T> allocator, T[] orig) static <T> T[]
ArrayHelper.subArray
(ArrayHelper.Allocator<T> allocator, T[] orig, int offset, int limit) Allocate a new array containing the subarray of orig starting at offset and ending before limit.static <T> T[]
ArrayHelper.subArray
(ArrayHelper.Allocator<T> allocator, T[] a, T[] b, int offset, int limit) Allocate an array containing values from a logical array formed by concatenating the two input arrays.static <T> T[]
ArrayHelper.suffix
(ArrayHelper.Allocator<T> allocator, T[] orig, int offset) Returns a copy of orig containing of length orig.length-offset containing all values from [offset,orig.length).static <T> T[]
ArrayHelper.suffixInsert
(ArrayHelper.Allocator<T> allocator, T[] orig, int offset, int index, T value) Returns a copy of orig containing of length orig.length-offset containing all values from [offset,orig.length) but with value inserted at index relative to orig (index-offset relative to resulting array) and all values past that point shifted to the right.