| Constructor and Description |
|---|
TestInbox()
Constructs the inbox.
|
TestInbox(Collection<?> collection)
Convenience for
new TestInbox().queue().addAll(o) |
| Modifier and Type | Method and Description |
|---|---|
void |
add(Object o)
Convenience for
inbox.queue().add(o) |
void |
addAll(Collection<?> collection)
Convenience for
inbox.queue().addAll(collection) |
void |
clear()
Convenience for
inbox.queue().clear() |
boolean |
isEmpty()
Returns
true if this inbox contains no elements, false otherwise. |
Iterator<Object> |
iterator()
Returns an iterator over the items in the inbox in the order they would
be returned by the
Inbox.poll() method. |
Object |
peek()
Retrieves, but does not remove, the head of this inbox, or returns
null if it is empty. |
Object |
poll()
Retrieves and removes the head of this inbox, or returns
null
if it is empty. |
Deque<Object> |
queue()
Retrieves the queue backing the inbox.
|
void |
remove()
Removes the head of this inbox.
|
int |
size()
Convenience for
inbox.queue().size() |
String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitforEach, spliteratorpublic TestInbox()
public TestInbox(Collection<?> collection)
new TestInbox().queue().addAll(o)public boolean isEmpty()
Inboxtrue if this inbox contains no elements, false otherwise.public Object peek()
Inboxnull if it is empty.public Object poll()
Inboxnull
if it is empty.public void remove()
Inboxpublic void add(Object o)
inbox.queue().add(o)public void addAll(Collection<?> collection)
inbox.queue().addAll(collection)@Nonnull public Iterator<Object> iterator()
InboxInbox.poll() method.
The returned iterator doesn't support the Iterator.remove()
method.
public void clear()
inbox.queue().clear()Copyright © 2023 Hazelcast, Inc.. All rights reserved.