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 arrayStorewith the copied portion of the underlying array.get(int index) Return the value at the given arrayindex.intlength()Return the length of the arrayStore.newInstance(int length) Return a newStoreof the same type and the given length.static <T> ObjectStore<T>static <T> ObjectStore<T>ofLength(int length) 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
-
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
-
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
-
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
-
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.
-
length
Description copied from interface:Array.StoreReturn the length of the arrayStore.- Specified by:
lengthin interfaceArray.Store<T>- Returns:
- the array store length
-
of
-
ofLength
-