public class PushedNotifications extends Vector<PushedNotification> implements List<PushedNotification>
A list of PushedNotification objects.
This list can be configured to retain a maximum number of objects. When that maximum is reached, older objects are removed from the list before new ones are added.
Internally, this list extends Vector.
capacityIncrement, elementCount, elementDatamodCount| Constructor and Description |
|---|
PushedNotifications()
Construct an empty list of PushedNotification objects.
|
PushedNotifications(int capacity)
Construct an empty list of PushedNotification objects with a suggested initial capacity.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(PushedNotification notification) |
boolean |
addAll(Collection<? extends PushedNotification> notifications) |
void |
addElement(PushedNotification notification) |
PushedNotifications |
getFailedNotifications()
Filter a list of pushed notifications and return only the ones that failed.
|
PushedNotifications |
getSuccessfulNotifications()
Filter a list of pushed notifications and return only the ones that were successful.
|
void |
setMaxRetained(int maxRetained)
Set the maximum number of objects that this list retains.
|
add, addAll, capacity, clear, clone, contains, containsAll, copyInto, elementAt, elements, ensureCapacity, equals, firstElement, forEach, get, hashCode, indexOf, indexOf, insertElementAt, isEmpty, iterator, lastElement, lastIndexOf, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeAllElements, removeElement, removeElementAt, removeIf, removeRange, replaceAll, retainAll, set, setElementAt, setSize, size, sort, spliterator, subList, toArray, toArray, toString, trimToSizefinalize, getClass, notify, notifyAll, wait, wait, waitadd, addAll, clear, contains, containsAll, equals, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArrayparallelStream, removeIf, streampublic PushedNotifications()
public PushedNotifications(int capacity)
capacity - public PushedNotifications getSuccessfulNotifications()
public PushedNotifications getFailedNotifications()
public boolean add(PushedNotification notification)
add in interface Collection<PushedNotification>add in interface List<PushedNotification>add in class Vector<PushedNotification>public void addElement(PushedNotification notification)
addElement in class Vector<PushedNotification>public boolean addAll(Collection<? extends PushedNotification> notifications)
addAll in interface Collection<PushedNotification>addAll in interface List<PushedNotification>addAll in class Vector<PushedNotification>public void setMaxRetained(int maxRetained)
maxRetained - the maxRetained value currently configured (default is 1000)Copyright © 2016. All rights reserved.