public class MaxDailyCounterQueue<E extends Number & Comparable<E>> extends ConcurrentLinkedDeque<E>
Constructor and Description |
---|
MaxDailyCounterQueue(int maxQueueLength) |
Modifier and Type | Method and Description |
---|---|
boolean |
add(E added) |
Optional<E> |
getMaxValue() |
Optional<E> |
getMaxValueInRange(int range) |
boolean |
isLimitSurpassed(E limit)
Check if any item in the collection surpass the limit
|
boolean |
isLimitSurpassed(int range,
E limit)
Check if any item within range surpass the limit
|
boolean |
isLimitSurpassedAllItems(E limit)
Check if all and every item in the collection surpass the limit
|
boolean |
isLimitSurpassedAllItems(int range,
E limit)
Check if all and every item within range surpass the limit
|
protected boolean |
isNextItem() |
ArrayDeque<E> |
subQueue(int range) |
String |
toString() |
addAll, addFirst, addLast, clear, 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
containsAll, removeAll, retainAll
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
containsAll, equals, hashCode, parallelStream, removeAll, removeIf, retainAll, stream
public boolean add(E added)
add
in interface Collection<E extends Number & Comparable<E>>
add
in interface Deque<E extends Number & Comparable<E>>
add
in interface Queue<E extends Number & Comparable<E>>
add
in class ConcurrentLinkedDeque<E extends Number & Comparable<E>>
public boolean isLimitSurpassed(E limit)
limit
- against which items should be checkpublic boolean isLimitSurpassed(int range, E limit)
range
- number of items to checklimit
- against which items should be checkpublic boolean isLimitSurpassedAllItems(E limit)
limit
- against which items should be checkpublic boolean isLimitSurpassedAllItems(int range, E limit)
range
- number of items to checklimit
- against which items should be checkpublic ArrayDeque<E> subQueue(int range)
protected boolean isNextItem()
public String toString()
toString
in class AbstractCollection<E extends Number & Comparable<E>>
Copyright © 2004–2020 "Tigase, Inc.". All rights reserved.