Class DiffableUtils.MapDiff<K,​T,​M>

  • Type Parameters:
    K - the type of map keys
    T - the type of map values
    M - the map implementation type
    All Implemented Interfaces:
    Diff<M>, Writeable
    Direct Known Subclasses:
    DiffableUtils.ImmutableOpenMapDiff
    Enclosing class:
    DiffableUtils

    public abstract static class DiffableUtils.MapDiff<K,​T,​M>
    extends java.lang.Object
    implements Diff<M>
    Represents differences between two maps of objects and is used as base class for different map implementations. Implements serialization. How differences are applied is left to subclasses.
    • Method Detail

      • getDeletes

        public java.util.List<K> getDeletes()
        The keys that, when this diff is applied to a map, should be removed from the map.
        Returns:
        the list of keys that are deleted
      • getDiffs

        public java.util.Map<K,​Diff<T>> getDiffs()
        Map entries that, when this diff is applied to a map, should be incrementally updated. The incremental update is represented using the Diff interface.
        Returns:
        the map entries that are incrementally updated
      • getUpserts

        public java.util.Map<K,​T> getUpserts()
        Map entries that, when this diff is applied to a map, should be added to the map or fully replace the previous value.
        Returns:
        the map entries that are additions or full updates