Class MapUpdate<K,​V>

  • Type Parameters:
    K - map key type
    V - map value type

    public final class MapUpdate<K,​V>
    extends java.lang.Object
    Map update operation.
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  MapUpdate.Builder<K,​V>
      MapUpdate builder.
      static class  MapUpdate.Type
      Type of database update operation.
    • Constructor Summary

      Constructors 
      Constructor Description
      MapUpdate()  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object object)  
      int hashCode()  
      K key()
      Returns the item key being updated.
      <S,​T>
      MapUpdate<S,​T>
      map​(java.util.function.Function<K,​S> keyMapper, java.util.function.Function<V,​T> valueMapper)
      Transforms this instance into an instance of different parameterized types.
      static <K,​V>
      MapUpdate.Builder<K,​V>
      newBuilder()
      Creates a new builder instance.
      java.lang.String toString()  
      MapUpdate.Type type()
      Returns the type of update operation.
      V value()
      Returns the new value.
      long version()
      Returns the expected current version in the database for the key.
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • MapUpdate

        public MapUpdate()
    • Method Detail

      • type

        public MapUpdate.Type type()
        Returns the type of update operation.
        Returns:
        type of update.
      • key

        public K key()
        Returns the item key being updated.
        Returns:
        item key
      • value

        public V value()
        Returns the new value.
        Returns:
        item's target value.
      • version

        public long version()
        Returns the expected current version in the database for the key.
        Returns:
        expected version.
      • map

        public <S,​T> MapUpdate<S,​T> map​(java.util.function.Function<K,​S> keyMapper,
                                                    java.util.function.Function<V,​T> valueMapper)
        Transforms this instance into an instance of different parameterized types.
        Type Parameters:
        S - key type of returned instance
        T - value type of returned instance
        Parameters:
        keyMapper - transcoder for key type
        valueMapper - transcoder to value type
        Returns:
        new instance
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object object)
        Overrides:
        equals in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • newBuilder

        public static <K,​V> MapUpdate.Builder<K,​V> newBuilder()
        Creates a new builder instance.
        Type Parameters:
        K - key type
        V - value type
        Returns:
        builder.