Package com.hazelcast.jet.core.test
Class TestInbox
- java.lang.Object
-
- com.hazelcast.jet.core.test.TestInbox
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(java.lang.Object o)
Convenience forinbox.queue().add(o)
void
addAll(java.util.Collection<?> collection)
Convenience forinbox.queue().addAll(collection)
void
clear()
Convenience forinbox.queue().clear()
boolean
isEmpty()
Returnstrue
if this inbox contains no elements,false
otherwise.java.util.Iterator<java.lang.Object>
iterator()
Returns an iterator over the items in the inbox in the order they would be returned by theInbox.poll()
method.java.lang.Object
peek()
Retrieves, but does not remove, the head of this inbox, or returnsnull
if it is empty.java.lang.Object
poll()
Retrieves and removes the head of this inbox, or returnsnull
if it is empty.java.util.Deque<java.lang.Object>
queue()
Retrieves the queue backing the inbox.void
remove()
Removes the head of this inbox.int
size()
Convenience forinbox.queue().size()
java.lang.String
toString()
-
-
-
Method Detail
-
isEmpty
public boolean isEmpty()
Description copied from interface:Inbox
Returnstrue
if this inbox contains no elements,false
otherwise.
-
peek
public java.lang.Object peek()
Description copied from interface:Inbox
Retrieves, but does not remove, the head of this inbox, or returnsnull
if it is empty.
-
poll
public java.lang.Object poll()
Description copied from interface:Inbox
Retrieves and removes the head of this inbox, or returnsnull
if it is empty.
-
remove
public void remove()
Description copied from interface:Inbox
Removes the head of this inbox. This method throws an exception if the inbox is empty.
-
queue
public java.util.Deque<java.lang.Object> queue()
Retrieves the queue backing the inbox.
-
add
public void add(java.lang.Object o)
Convenience forinbox.queue().add(o)
-
addAll
public void addAll(java.util.Collection<?> collection)
Convenience forinbox.queue().addAll(collection)
-
iterator
@Nonnull public java.util.Iterator<java.lang.Object> iterator()
Description copied from interface:Inbox
Returns an iterator over the items in the inbox in the order they would be returned by theInbox.poll()
method.The returned iterator doesn't support the
Iterator.remove()
method.
-
clear
public void clear()
Convenience forinbox.queue().clear()
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-