Class MapUpdate<K,​V>

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

    public final class MapUpdate<K,​V>
    extends Object
    Map update operation.
    • 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​(Function<K,​S> keyMapper,
                                                    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 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.