|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.AbstractCollection<E>
java.util.AbstractList<E>
java.util.Vector<PushedNotification>
javapns.notification.PushedNotifications
public class PushedNotifications
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.
Constructor Summary | |
---|---|
PushedNotifications()
Construct an empty list of PushedNotification objects. |
|
PushedNotifications(int capacity)
Construct an empty list of PushedNotification objects with a suggested initial capacity. |
|
PushedNotifications(PushedNotifications parent)
Construct an empty list of PushedNotification objects, and copy the maxRetained property from the provided parent list. |
Method Summary | |
---|---|
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. |
int |
getMaxRetained()
Get the maximum number of objects that this list retains. |
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. |
Methods inherited from class java.util.Vector |
---|
add, addAll, capacity, clear, clone, contains, containsAll, copyInto, elementAt, elements, ensureCapacity, equals, firstElement, get, hashCode, indexOf, indexOf, insertElementAt, isEmpty, lastElement, lastIndexOf, lastIndexOf, remove, remove, removeAll, removeAllElements, removeElement, removeElementAt, retainAll, set, setElementAt, setSize, size, subList, toArray, toArray, toString, trimToSize |
Methods inherited from class java.util.AbstractList |
---|
iterator, listIterator, listIterator |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.util.List |
---|
add, addAll, clear, contains, containsAll, equals, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, retainAll, set, size, subList, toArray, toArray |
Constructor Detail |
---|
public PushedNotifications()
public PushedNotifications(int capacity)
capacity
- public PushedNotifications(PushedNotifications parent)
parent
- Method Detail |
---|
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)public int getMaxRetained()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |