Class KeyValue<K,​V>

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

    public class KeyValue<K,​V>
    extends 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 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
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object