Class AbstractImmutableEntry<K,​V>

  • All Implemented Interfaces:
    java.io.Serializable, java.util.Map.Entry<K,​V>
    Direct Known Subclasses:
    ImmutableEntry, ImmutableEntryWithHashingStrategy

    public class AbstractImmutableEntry<K,​V>
    extends java.lang.Object
    implements java.util.Map.Entry<K,​V>, java.io.Serializable
    See Also:
    Serialized Form
    • Constructor Detail

      • AbstractImmutableEntry

        public AbstractImmutableEntry​(K key,
                                      V value)
    • Method Detail

      • getKeyFunction

        @Deprecated
        public static <K> Function<java.util.Map.Entry<K,​?>,​K> getKeyFunction()
        Deprecated.
        Since 6.2 - Use Functions.getKeyFunction() instead.
      • getPairFunction

        public static <K,​V> Function<java.util.Map.Entry<K,​V>,​Pair<K,​V>> getPairFunction()
      • getKey

        public K getKey()
        Specified by:
        getKey in interface java.util.Map.Entry<K,​V>
      • getValue

        public V getValue()
        Specified by:
        getValue in interface java.util.Map.Entry<K,​V>
      • setValue

        public V setValue​(V value)

        This implementation throws an UnsupportedOperationException. Override this method to support mutable map entries.

        Specified by:
        setValue in interface java.util.Map.Entry<K,​V>
      • toString

        public java.lang.String toString()
        Returns a string representation of the form {key}={value}.
        Overrides:
        toString in class java.lang.Object