Interface MutableLongSlice

All Superinterfaces:
Enumeration<Long>, Iterable<Long>, LongSlice, LongView, MutableSlice<Long>, Resettable, ResettableEnumeration<Long>, Slice<Long>, View<Long>
All Known Implementing Classes:
MutableArrayLongSlice

@API(status=STABLE) public interface MutableLongSlice extends MutableSlice<Long>, LongSlice
A mutable slice is a subtype of a regular LongSlice, which allows mutating the start- and end-index of the slice. This allows the reduction of allocation overhead in loops for example.
Since:
25/08/2022
  • Method Details

    • of

      @NotNull static @NotNull MutableLongSlice of(long[] ref, int offset, int size)
      Creates a new mutable slice instance which references the given array.
      Parameters:
      ref - The array of which to create a slice.
      offset - The index at which the newly created slice should begin.
      size - The size of the newly created slice.
      Returns:
      A new mutable slice instance, which references the given array.
    • of

      @NotNull static @NotNull MutableLongSlice of(long... ref)
      Creates a new mutable slice instance which references the given array.
      Parameters:
      ref - The array of which to create a slice.
      Returns:
      A new mutable slice instance, which references the given array.