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 arrayStore
with the copied portion of the underlying array.get
(int index) Return the value at the given arrayindex
.boolean
isSealed()
int
length()
Return the length of the arrayStore
.newInstance
(int length) Return a newStore
of the same type and the given length.static <T> Array.Store.Ref<T>
of
(Array.Store<T> value) seal()
void
Write the givenvalue
at the givenindex
to the underlying array structure.void
sort
(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, wait
Methods inherited from interface io.jenetics.internal.collection.Array.Store
copy, copy
-
Method Details
-
seal
-
isSealed
-
set
Description copied from interface:Array.Store
Write the givenvalue
at the givenindex
to the underlying array structure.- Specified by:
set
in interfaceArray.Store<T>
- Parameters:
index
- the array indexvalue
- the value to set
-
sort
Description copied from interface:Array.Store
Sort the store.- Specified by:
sort
in interfaceArray.Store<T>
- Parameters:
from
- the start index where to start sorting (inclusively)until
- the end index where to stop sorting (exclusively)comparator
- theComparator
used to compare sequence elements. Anull
value indicates that the elements' Comparable natural ordering should be used
-
get
Description copied from interface:Array.Store
Return the value at the given arrayindex
.- Specified by:
get
in interfaceArray.Store<T>
- Parameters:
index
- the array index- Returns:
- the value at the given index
-
length
Description copied from interface:Array.Store
Return the length of the arrayStore
.- Specified by:
length
in interfaceArray.Store<T>
- Returns:
- the array store length
-
copy
Description copied from interface:Array.Store
Return a new arrayStore
with the copied portion of the underlying array.- Specified by:
copy
in 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.Store
Return a newStore
of the same type and the given length.- Specified by:
newInstance
in interfaceArray.Store<T>
- Parameters:
length
- the length of the new store- Returns:
- a new
Store
of the same type and the given length.
-
of
-