Class CharStore

java.lang.Object
CharStore
All Implemented Interfaces:
Array.Store<Character>, Serializable

public final class CharStore extends Object implements Array.Store<Character>, Serializable
Since:
3.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>
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    final char[]
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    CharStore(int length)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    copy(int from, int until)
    Return a new array Store with the copied portion of the underlying array.
    get(int index)
    Return the value at the given array index.
    int
    Return the length of the array Store.
    newInstance(int length)
    Return a new Store of the same type and the given length.
    static CharStore
    of(char[] chars)
     
    void
    set(int index, Character value)
    Write the given value at the given index to the underlying array structure.
    void
    sort(int from, int until, Comparator<? super Character> 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
  • Field Details

    • array

      public final char[] array
  • Constructor Details

  • Method Details

    • get

      public Character get(int index)
      Description copied from interface: Array.Store
      Return the value at the given array index.
      Specified by:
      get in interface Array.Store<Character>
      Parameters:
      index - the array index
      Returns:
      the value at the given index
    • sort

      public void sort(int from, int until, Comparator<? super Character> comparator)
      Description copied from interface: Array.Store
      Sort the store.
      Specified by:
      sort in interface Array.Store<Character>
      Parameters:
      from - the start index where to start sorting (inclusively)
      until - the end index where to stop sorting (exclusively)
      comparator - the Comparator used to compare sequence elements. A null value indicates that the elements' Comparable natural ordering should be used
    • set

      public void set(int index, Character value)
      Description copied from interface: Array.Store
      Write the given value at the given index to the underlying array structure.
      Specified by:
      set in interface Array.Store<Character>
      Parameters:
      index - the array index
      value - the value to set
    • copy

      public CharStore copy(int from, int until)
      Description copied from interface: Array.Store
      Return a new array Store with the copied portion of the underlying array.
      Specified by:
      copy in interface Array.Store<Character>
      Parameters:
      from - the start index of the copied array
      until - the end index of the copied array
      Returns:
      a new copy of the given range
    • newInstance

      public CharStore newInstance(int length)
      Description copied from interface: Array.Store
      Return a new Store of the same type and the given length.
      Specified by:
      newInstance in interface Array.Store<Character>
      Parameters:
      length - the length of the new store
      Returns:
      a new Store of the same type and the given length.
    • length

      public int length()
      Description copied from interface: Array.Store
      Return the length of the array Store.
      Specified by:
      length in interface Array.Store<Character>
      Returns:
      the array store length
    • of

      public static CharStore of(char[] chars)