Interface ByteIndexedContainer

All Superinterfaces:
ByteCollection, ByteContainer, Iterable<ByteCursor>, RandomAccess
All Known Implementing Classes:
ByteArrayList, ByteStack

@Generated(date="2024-02-21T00:00:00+0000", value="KTypeIndexedContainer.java") public interface ByteIndexedContainer extends ByteCollection, RandomAccess
An indexed container provides random access to elements based on an index. Indexes are zero-based.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    add(byte e1)
    Adds an element to the end of this container (the last index is incremented by one).
    byte
    get(int index)
     
    int
    indexOf(byte e1)
    Returns the index of the first occurrence of the specified element in this list, or -1 if this list does not contain the element.
    void
    insert(int index, byte e1)
    Inserts the specified element at the specified position in this list.
    int
    lastIndexOf(byte e1)
    Returns the index of the last occurrence of the specified element in this list, or -1 if this list does not contain the element.
    byte
    remove(int index)
    Removes the element at the specified position in this container and returns it.
    int
    removeFirst(byte e1)
    Removes the first element that equals e1, returning its deleted position or -1 if the element was not found.
    int
    removeLast(byte e1)
    Removes the last element that equals e1, returning its deleted position or -1 if the element was not found.
    void
    removeRange(int fromIndex, int toIndex)
    Removes from this container all of the elements with indexes between fromIndex, inclusive, and toIndex, exclusive.
    byte
    set(int index, byte e1)
    Replaces the element at the specified position in this list with the specified element.

    Methods inherited from interface com.carrotsearch.hppc.ByteCollection

    clear, release, removeAll, removeAll, removeAll, retainAll, retainAll

    Methods inherited from interface com.carrotsearch.hppc.ByteContainer

    contains, forEach, isEmpty, iterator, size, toArray

    Methods inherited from interface java.lang.Iterable

    forEach, spliterator
  • Method Details

    • removeFirst

      int removeFirst(byte e1)
      Removes the first element that equals e1, returning its deleted position or -1 if the element was not found.
    • removeLast

      int removeLast(byte e1)
      Removes the last element that equals e1, returning its deleted position or -1 if the element was not found.
    • indexOf

      int indexOf(byte e1)
      Returns the index of the first occurrence of the specified element in this list, or -1 if this list does not contain the element.
    • lastIndexOf

      int lastIndexOf(byte e1)
      Returns the index of the last occurrence of the specified element in this list, or -1 if this list does not contain the element.
    • add

      void add(byte e1)
      Adds an element to the end of this container (the last index is incremented by one).
    • insert

      void insert(int index, byte e1)
      Inserts the specified element at the specified position in this list.
      Parameters:
      index - The index at which the element should be inserted, shifting any existing and subsequent elements to the right.
    • set

      byte set(int index, byte e1)
      Replaces the element at the specified position in this list with the specified element.
      Returns:
      Returns the previous value in the list.
    • get

      byte get(int index)
      Returns:
      Returns the element at index index from the list.
    • remove

      byte remove(int index)
      Removes the element at the specified position in this container and returns it.
      See Also:
    • removeRange

      void removeRange(int fromIndex, int toIndex)
      Removes from this container all of the elements with indexes between fromIndex, inclusive, and toIndex, exclusive.