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

Interface IntDeque

  • All Superinterfaces:
    IntCollection, IntContainer, java.lang.Iterable<IntCursor>
    All Known Implementing Classes:
    IntArrayDeque


    @Generated(date="2015-05-07T09:33:04+0200",
               value="KTypeDeque.java")
    public interface IntDeque
    extends IntCollection
    A linear collection that supports element insertion and removal at both ends.
    See Also:
    Deque
    • Method Detail

      • removeFirst

        int removeFirst(int e)
        Removes the first element that equals e.
        Returns:
        The deleted element's index or -1 if the element was not found.
      • removeLast

        int removeLast(int e)
        Removes the last element that equals e.
        Returns:
        The deleted element's index or -1 if the element was not found.
      • addFirst

        void addFirst(int e)
        Inserts the specified element at the front of this deque.
      • addLast

        void addLast(int e)
        Inserts the specified element at the end of this deque.
      • removeFirst

        int removeFirst()
        Retrieves and removes the first element of this deque.
        Returns:
        the head (first) element of this deque.
      • removeLast

        int removeLast()
        Retrieves and removes the last element of this deque.
        Returns:
        the tail of this deque.
      • getFirst

        int getFirst()
        Retrieves the first element of this deque but does not remove it.
        Returns:
        the head of this deque.
      • getLast

        int getLast()
        Retrieves the last element of this deque but does not remove it.
        Returns:
        the head of this deque.
      • descendingIterator

        java.util.Iterator<IntCursor> descendingIterator()
        Returns:
        An iterator over elements in this deque in tail-to-head order.
      • descendingForEach

        <T extends IntProcedure> T descendingForEach(T procedure)
        Applies a procedure to all elements in tail-to-head order.
      • descendingForEach

        <T extends IntPredicate> T descendingForEach(T predicate)
        Applies a predicate to container elements as long, as the predicate returns true. The iteration is interrupted otherwise.

DataMelt 3.0 © DataMelt by jWork.ORG

Ads help maintain this website.