Package io.permazen.core.util
Interface ObjIdQueue
@NotThreadSafe
public interface ObjIdQueue
A queue of
ObjId
's, where ObjId
's can be added or removed one at a time.
Instances allow duplicates.
Instances are not thread safe.
- See Also:
-
Method Summary
-
Method Details
-
add
Add anObjId
to this queue.- Parameters:
id
- theObjId
to add- Throws:
IllegalArgumentException
- ifid
is nullIllegalStateException
- if the maximum capacity is exceeded
-
next
ObjId next()Remove and return the nextObjId
from this queue.- Returns:
- the next
ObjId
- Throws:
NoSuchElementException
- if this queue is empty
-
size
int size()Get the number ofObjId
's in this queue.- Returns:
- current size
-
isEmpty
boolean isEmpty()Determine whether this instance is empty.- Returns:
- true if empty, otherwise false
-