Package io.permazen.core.util
Class ObjIdQueues
java.lang.Object
io.permazen.core.util.ObjIdQueues
Factory methods for creating
ObjIdQueue
's.-
Method Summary
Modifier and TypeMethodDescriptionstatic ObjIdQueue
fifo()
Create a new empty instance with first-in-first-out (FIFO) behavior.static ObjIdQueue
Create a new instance with first-in-first-out (FIFO) behavior and initial contents copied from the given set.static ObjIdQueue
lifo()
Create a new empty instance with last-in-first-out (LIFO) behavior.static ObjIdQueue
Create a new instance with last-in-first-out (LIFO) behavior and initial contents copied from the given set.static ObjIdQueue
Create a new empty instance with no guaranted ordering.static ObjIdQueue
Create a new instance with no guaranted ordering and initial contents copied from the given set.
-
Method Details
-
fifo
Create a new empty instance with first-in-first-out (FIFO) behavior.- Returns:
- FIFO queue
-
fifo
Create a new instance with first-in-first-out (FIFO) behavior and initial contents copied from the given set.No particular ordering of the
ObjId
's taken frominitial
is defined. To guarantee a specific ordering, start with an empty instance.- Parameters:
initial
- queue initial contents- Returns:
- FIFO queue
- Throws:
IllegalArgumentException
- ifinitial
is null
-
lifo
Create a new empty instance with last-in-first-out (LIFO) behavior.- Returns:
- LIFO queue
-
lifo
Create a new instance with last-in-first-out (LIFO) behavior and initial contents copied from the given set.No particular ordering of the
ObjId
's taken frominitial
is defined. To guarantee a specific ordering, start with an empty instance.- Parameters:
initial
- queue initial contents- Returns:
- LIFO queue
- Throws:
IllegalArgumentException
- ifinitial
is null
-
unordered
Create a new empty instance with no guaranted ordering.- Returns:
- unordered queue
-
unordered
Create a new instance with no guaranted ordering and initial contents copied from the given set.- Parameters:
initial
- queue initial contents- Returns:
- unordered queue
- Throws:
IllegalArgumentException
- ifinitial
is null
-