Class MapsDifference.Entry<K,​V>

  • Type Parameters:
    K - The type of the key.
    V - The type of the values.
    Enclosing class:
    MapsDifference

    @Immutable(containerOf={"K","V"})
    public abstract static class MapsDifference.Entry<K,​V>
    extends Object
    Class representing the difference between two maps for a given key. This class only allows non-null keys and values.
    • Method Detail

      • forLeftValueOnly

        public static <K,​V> MapsDifference.Entry<K,​V> forLeftValueOnly​(K pKey,
                                                                                   V pLeftValue)
      • forRightValueOnly

        public static <K,​V> MapsDifference.Entry<K,​V> forRightValueOnly​(K pKey,
                                                                                    V pRightValue)
      • forDifferingValues

        public static <K,​V> MapsDifference.Entry<K,​V> forDifferingValues​(K pKey,
                                                                                     V pLeftValue,
                                                                                     V pRightValue)
      • getKey

        public abstract K getKey()
        Returns the map key.
      • getLeftValue

        public abstract Optional<V> getLeftValue()
        Returns the left value, if present.
      • getRightValue

        public abstract Optional<V> getRightValue()
        Returns the right value, if present.