tigase.stats

## Class MaxDailyCounterQueue<E extends Number & Comparable<E>>

- java.lang.Object
- - java.util.AbstractCollection<E>
  - - java.util.ArrayDeque<E>
    - - tigase.stats.MaxDailyCounterQueue<E>

- Type Parameters:
    `E` -
  All Implemented Interfaces:
    Serializable, Cloneable, Iterable<E>, Collection<E>, Deque<E>, Queue<E>

      public class MaxDailyCounterQueue<E extends Number & Comparable<E>>
      extends ArrayDeque<E>

  A queue implementation which stores highest added value on a given day and has limited size.
  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `MaxDailyCounterQueue(int limit)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `add(E added)`
    `E` | `getMaxValueInRange(int range)`
    `boolean` | `isLimitSurpassedAllItems(int range, long limit)`
    `protected boolean` | `isNextItem()`
    `static void` | `main(String[] args)`
    `ArrayDeque<E>` | `subQueue(int range)`
    `String` | `toString()`

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

      `addFirst, addLast, clear, clone, contains, descendingIterator, element, getFirst, getLast, isEmpty, iterator, offer, offerFirst, offerLast, peek, peekFirst, peekLast, poll, pollFirst, pollLast, pop, push, remove, remove, removeFirst, removeFirstOccurrence, removeLast, removeLastOccurrence, size, spliterator, toArray, toArray`

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

      `addAll, containsAll, removeAll, retainAll`

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

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

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

      `addAll, containsAll, equals, hashCode, parallelStream, removeAll, removeIf, retainAll, stream`

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

      `forEach`

- - ### Constructor Detail

    - #### MaxDailyCounterQueue

          public MaxDailyCounterQueue(int limit)

  - ### Method Detail

    - #### main

          public static void main(String[] args)

    - #### add

          public boolean add(E added)

      Specified by:
        `add` in interface `Collection<E extends Number & Comparable<E>>`
      Specified by:
        `add` in interface `Deque<E extends Number & Comparable<E>>`
      Specified by:
        `add` in interface `Queue<E extends Number & Comparable<E>>`
      Overrides:
        `add` in class `ArrayDeque<E extends Number & Comparable<E>>`

    - #### getMaxValueInRange

          public E getMaxValueInRange(int range)

    - #### isLimitSurpassedAllItems

          public boolean isLimitSurpassedAllItems(int range,
                                                  long limit)

    - #### subQueue

          public ArrayDeque<E> subQueue(int range)

    - #### isNextItem

          protected boolean isNextItem()

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `AbstractCollection<E extends Number & Comparable<E>>`

Copyright © 2017 "Tigase, Inc.". All rights reserved.