Class KeyValue<K,​V>

  • Type Parameters:
    K - Key type
    V - Value type

    public class KeyValue<K,​V>
    extends java.lang.Object
    A key-value pair defined for a single Kafka Streams record. If the record comes directly from a Kafka topic then its key/value are defined as the message key/value.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      K key
      The key of the key-value pair.
      V value
      The value of the key-value pair.
    • Constructor Summary

      Constructors 
      Constructor Description
      KeyValue​(K key, V value)
      Create a new key-value pair.
    • Field Detail

      • key

        public final K key
        The key of the key-value pair.
      • value

        public final V value
        The value of the key-value pair.
    • Constructor Detail

      • KeyValue

        public KeyValue​(K key,
                        V value)
        Create a new key-value pair.
        Parameters:
        key - the key
        value - the value
    • Method Detail

      • pair

        public static <K,​V> KeyValue<K,​V> pair​(K key,
                                                           V value)
        Create a new key-value pair.
        Type Parameters:
        K - the type of the key
        V - the type of the value
        Parameters:
        key - the key
        value - the value
        Returns:
        a new key-value pair
      • toString

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

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • hashCode

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