Class ObjIdQueues

java.lang.Object
io.permazen.core.util.ObjIdQueues

public final class ObjIdQueues extends Object
Factory methods for creating ObjIdQueue's.
  • Method Details

    • fifo

      public static ObjIdQueue fifo()
      Create a new empty instance with first-in-first-out (FIFO) behavior.
      Returns:
      FIFO queue
    • fifo

      public static ObjIdQueue fifo(ObjIdSet initial)
      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 from initial is defined. To guarantee a specific ordering, start with an empty instance.

      Parameters:
      initial - queue initial contents
      Returns:
      FIFO queue
      Throws:
      IllegalArgumentException - if initial is null
    • lifo

      public static ObjIdQueue lifo()
      Create a new empty instance with last-in-first-out (LIFO) behavior.
      Returns:
      LIFO queue
    • lifo

      public static ObjIdQueue lifo(ObjIdSet initial)
      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 from initial is defined. To guarantee a specific ordering, start with an empty instance.

      Parameters:
      initial - queue initial contents
      Returns:
      LIFO queue
      Throws:
      IllegalArgumentException - if initial is null
    • unordered

      public static ObjIdQueue unordered()
      Create a new empty instance with no guaranted ordering.
      Returns:
      unordered queue
    • unordered

      public static ObjIdQueue unordered(ObjIdSet initial)
      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 - if initial is null