E
- public class MaxDailyCounterQueue<E extends Number & Comparable<E>> extends ArrayDeque<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() |
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
addAll, containsAll, removeAll, retainAll
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
addAll, 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 ArrayDeque<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 © 2018 "Tigase, Inc.". All rights reserved.