java.lang.Object
Ref<T>
- Type Parameters:
T- the array element type
- All Implemented Interfaces:
Array.Store<T>
- Enclosing interface:
- Array.Store<T>
Mutable reference of an underlying array
Store.- Since:
- 3.4
- Version:
- 3.4
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.jenetics.internal.collection.Array.Store
Array.Store.Ref<T> -
Method Summary
Modifier and TypeMethodDescriptioncopy(int from, int until) Return a new arrayStorewith the copied portion of the underlying array.get(int index) Return the value at the given arrayindex.booleanisSealed()intlength()Return the length of the arrayStore.newInstance(int length) Return a newStoreof the same type and the given length.static <T> Array.Store.Ref<T>of(Array.Store<T> value) seal()voidWrite the givenvalueat the givenindexto the underlying array structure.voidsort(int from, int until, Comparator<? super T> comparator) Sort the store.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.jenetics.internal.collection.Array.Store
copy, copy
-
Method Details
-
seal
-
isSealed
-
set
Description copied from interface:Array.StoreWrite the givenvalueat the givenindexto the underlying array structure.- Specified by:
setin interfaceArray.Store<T>- Parameters:
index- the array indexvalue- the value to set
-
sort
Description copied from interface:Array.StoreSort the store.- Specified by:
sortin interfaceArray.Store<T>- Parameters:
from- the start index where to start sorting (inclusively)until- the end index where to stop sorting (exclusively)comparator- theComparatorused to compare sequence elements. Anullvalue indicates that the elements' Comparable natural ordering should be used
-
get
Description copied from interface:Array.StoreReturn the value at the given arrayindex.- Specified by:
getin interfaceArray.Store<T>- Parameters:
index- the array index- Returns:
- the value at the given index
-
length
Description copied from interface:Array.StoreReturn the length of the arrayStore.- Specified by:
lengthin interfaceArray.Store<T>- Returns:
- the array store length
-
copy
Description copied from interface:Array.StoreReturn a new arrayStorewith the copied portion of the underlying array.- Specified by:
copyin interfaceArray.Store<T>- Parameters:
from- the start index of the copied arrayuntil- the end index of the copied array- Returns:
- a new copy of the given range
-
newInstance
Description copied from interface:Array.StoreReturn a newStoreof the same type and the given length.- Specified by:
newInstancein interfaceArray.Store<T>- Parameters:
length- the length of the new store- Returns:
- a new
Storeof the same type and the given length.
-
of
-