java.lang.Object
ObjectStore<T>
- All Implemented Interfaces:
Array.Store<T>
,Serializable
- Since:
- 6.0
- Version:
- 6.0
- See Also:
-
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
.int
length()
Return the length of the arrayStore
.newInstance
(int length) Return a newStore
of the same type and the given length.static <T> ObjectStore<T>
static <T> ObjectStore<T>
ofLength
(int length) 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
-
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
-
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
-
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
-
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.
-
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
-
of
-
ofLength
-