Class Array.Store.Ref<T>

Type Parameters:
T - the array element type
All Implemented Interfaces:
Array.Store<T>
Enclosing interface:
Array.Store<T>

public static final class Array.Store.Ref<T> extends Object implements Array.Store<T>
Mutable reference of an underlying array Store.
Since:
3.4
Version:
3.4
  • Method Details

    • seal

      public Array.Store.Ref<T> seal()
    • isSealed

      public boolean isSealed()
    • set

      public void set(int index, T 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<T>
      Parameters:
      index - the array index
      value - the value to set
    • sort

      public void sort(int from, int until, Comparator<? super T> comparator)
      Description copied from interface: Array.Store
      Sort the store.
      Specified by:
      sort in interface Array.Store<T>
      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
    • get

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

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

      public Array.Store<T> 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<T>
      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 Array.Store<T> 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<T>
      Parameters:
      length - the length of the new store
      Returns:
      a new Store of the same type and the given length.
    • of

      public static <T> Array.Store.Ref<T> of(Array.Store<T> value)