Package 

Interface Patch

  • All Implemented Interfaces:

    
    public interface Patch
    
                        

    Patch interface that allows easy creation of patch operations.

    This interface is used by the Sunday generator to generate patch types.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      <T extends Any> PatchOp.Set<T> set(T value) Creates a JSON Merge Patch PatchOp.Set operation from the provided value that sets/replaces the current value.
      <T extends Any> PatchOp.Delete<T> delete() Creates a JSON Merge Patch PatchOp.Delete operation that deletes the current value.
      <T extends Any> PatchOp.None<T> none() Creates a JSON Merge Patch PatchOp.None operation that leaves the current value untouched.
      <T extends Any> PatchOp<T> setOrDelete(T value) Creates a JSON Merge Patch PatchOp.Set or PatchOp.Delete operation from the provided value.
      • Methods inherited from class kotlin.Any

        equals, hashCode, toString
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

    • Method Detail

      • set

         <T extends Any> PatchOp.Set<T> set(T value)

        Creates a JSON Merge Patch PatchOp.Set operation from the provided value that sets/replaces the current value.

        Parameters:
        value - Value to set/replace the current value with.
      • setOrDelete

         <T extends Any> PatchOp<T> setOrDelete(T value)

        Creates a JSON Merge Patch PatchOp.Set or PatchOp.Delete operation from the provided value. If the value provided is not null a PatchOp.Set operation is created to set/replace the current value. Alternatively, when the provided value is null a PatchOp.Delete operation is created to delete the current value.

        Parameters:
        value - Value to set/replace the current value or delete the current value.