tigase.collections

## Class CircularFifoQueue<E>

- java.lang.Object
- - java.util.AbstractCollection<E>
  - - java.util.AbstractQueue<E>
    - - tigase.collections.CircularFifoQueue<E>

- All Implemented Interfaces:
    Iterable<E>, Collection<E>, Queue<E>

      public class CircularFifoQueue<E>
      extends AbstractQueue<E>

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `CircularFifoQueue(int maxEntries, Consumer<E> overflowConsumer)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `add(E e)`
    `boolean` | `addAll(Collection<? extends E> c)`
    `Iterator<E>` | `iterator()`
    `int` | `limit()`
    `boolean` | `offer(E element)`
    `E` | `peek()`
    `E` | `poll()`
    `boolean` | `setLimit(int limit)`
    `int` | `size()`

    - ### Methods inherited from class java.util.AbstractQueue

      `clear, element, remove`

    - ### Methods inherited from class java.util.AbstractCollection

      `contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toString`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

    - ### Methods inherited from interface java.util.Collection

      `contains, containsAll, equals, hashCode, isEmpty, parallelStream, remove, removeAll, removeIf, retainAll, spliterator, stream, toArray, toArray`

    - ### Methods inherited from interface java.lang.Iterable

      `forEach`

- - ### Constructor Detail

    - #### CircularFifoQueue

          public CircularFifoQueue(int maxEntries,
                                   Consumer<E> overflowConsumer)

  - ### Method Detail

    - #### add

          public boolean add(E e)

      Specified by:
        `add` in interface `Collection<E>`
      Specified by:
        `add` in interface `Queue<E>`
      Overrides:
        `add` in class `AbstractQueue<E>`

    - #### addAll

          public boolean addAll(Collection<? extends E> c)

      Specified by:
        `addAll` in interface `Collection<E>`
      Overrides:
        `addAll` in class `AbstractQueue<E>`

    - #### iterator

          public Iterator<E> iterator()

      Specified by:
        `iterator` in interface `Iterable<E>`
      Specified by:
        `iterator` in interface `Collection<E>`
      Specified by:
        `iterator` in class `AbstractCollection<E>`

    - #### limit

          public int limit()

    - #### offer

          public boolean offer(E element)

    - #### peek

          public E peek()

    - #### poll

          public E poll()

    - #### setLimit

          public boolean setLimit(int limit)

    - #### size

          public int size()

      Specified by:
        `size` in interface `Collection<E>`
      Specified by:
        `size` in class `AbstractCollection<E>`

Copyright © 2004–2020 "Tigase, Inc.". All rights reserved.