Package tigase.stats

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

    • Constructor Detail

      • MaxDailyCounterQueue

        public MaxDailyCounterQueue​(int maxQueueLength)
    • Method Detail

      • getMaxValue

        public Optional<E> getMaxValue()
      • getMaxValueInRange

        public Optional<E> getMaxValueInRange​(int range)
      • isLimitSurpassed

        public boolean isLimitSurpassed​(E limit)
        Check if any item in the collection surpass the limit
        Parameters:
        limit - against which items should be check
        Returns:
        indicating whether any item in the collection surpass the limit
      • isLimitSurpassed

        public boolean isLimitSurpassed​(int range,
                                        E limit)
        Check if any item within range surpass the limit
        Parameters:
        range - number of items to check
        limit - against which items should be check
        Returns:
        indicating whether any item within range surpass the limit
      • isLimitSurpassedAllItems

        public boolean isLimitSurpassedAllItems​(E limit)
        Check if all and every item in the collection surpass the limit
        Parameters:
        limit - against which items should be check
        Returns:
        indicating whether all items in the collection surpass the limit
      • isLimitSurpassedAllItems

        public boolean isLimitSurpassedAllItems​(int range,
                                                E limit)
        Check if all and every item within range surpass the limit
        Parameters:
        range - number of items to check
        limit - against which items should be check
        Returns:
        indicating whether all items within range surpass the limit
      • subQueue

        public ArrayDeque<E> subQueue​(int range)
      • isNextItem

        protected boolean isNextItem()