Documentation of 'com.carrotsearch.hppc.CharIndexedContainer' Java class
CharIndexedContainer
com.carrotsearch.hppc

Interface CharIndexedContainer

  • All Superinterfaces:
    CharCollection, CharContainer, java.lang.Iterable<CharCursor>, java.util.RandomAccess
    All Known Implementing Classes:
    CharArrayList, CharStack


    @Generated(date="2015-05-07T09:33:04+0200",
               value="KTypeIndexedContainer.java")
    public interface CharIndexedContainer
    extends CharCollection, java.util.RandomAccess
    An indexed container provides random access to elements based on an index. Indexes are zero-based.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method and Description
      void add(char e1)
      Adds an element to the end of this container (the last index is incremented by one).
      char get(int index) 
      int indexOf(char 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, char e1)
      Inserts the specified element at the specified position in this list.
      int lastIndexOf(char 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.
      char remove(int index)
      Removes the element at the specified position in this container and returns it.
      int removeFirst(char e1)
      Removes the first element that equals e1, returning its deleted position or -1 if the element was not found.
      int removeLast(char 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.
      char set(int index, char e1)
      Replaces the element at the specified position in this list with the specified element.
      • Methods inherited from interface java.lang.Iterable

        forEach, spliterator
    • Method Detail

      • removeFirst

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

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

        int indexOf(char 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(char 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(char e1)
        Adds an element to the end of this container (the last index is incremented by one).
      • insert

        void insert(int index,
                    char 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

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

        char get(int index)
        Returns:
        Returns the element at index index from the list.
      • removeRange

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

DataMelt 3.0 © DataMelt by jWork.ORG

Ads help maintain this website.