Class InventoryUpdater.Builder

    • Constructor Detail

      • Builder

        public Builder()
    • Method Detail

      • buildBlankState

        public InventoryUpdater buildBlankState​(Inventory inventory)
        Constructs a new InventoryUpdater that does NOT copy over the state from the previous version.
        Parameters:
        inventory - the original inventory
        Returns:
        inventory updater
      • buildCopyState

        public InventoryUpdater buildCopyState​(Inventory inventory)
        Constructs a new InventoryUpdater that copies over the state from the previous version.
        Parameters:
        inventory - the original inventory
        Returns:
        inventory updater
      • buildCopyState

        public InventoryUpdater buildCopyState​(Inventory inventory,
                                               VersionNum versionNum)
        Constructs a new InventoryUpdater that copies over the state from a previous version.
        Parameters:
        inventory - the original inventory
        versionNum - the id over the version to copy
        Returns:
        inventory updater
      • buildCopyStateMutable

        public InventoryUpdater buildCopyStateMutable​(Inventory inventory)
        Constructs a new InventoryUpdater that copies over the state from the previous version, and creates a mutable HEAD version.
        Parameters:
        inventory - the original inventory
        Returns:
        inventory updater