Class UpdateUtils


  • public class UpdateUtils
    extends java.lang.Object
    Provides convenience methods for applying UpdateOps to Documents.
    • Constructor Detail

      • UpdateUtils

        public UpdateUtils()
    • Method Detail

      • applyChanges

        public static void applyChanges​(@NotNull
                                        @NotNull Document doc,
                                        @NotNull
                                        @NotNull UpdateOp update)
        Apply the changes to the in-memory document.
        Parameters:
        doc - the target document.
        update - the changes to apply.
      • assertUnconditional

        public static void assertUnconditional​(@NotNull
                                               @NotNull UpdateOp up)
        Ensures that the given UpdateOp is unconditional
        Parameters:
        up - the update operation
        Throws:
        java.lang.IllegalArgumentException - when the operations is conditional