com.hazelcast.jet.datamodel

## Class TimestampedEntry<K,V>

- java.lang.Object
- - com.hazelcast.jet.datamodel.TimestampedEntry<K,V>

- Type Parameters:
    `K` - type of grouping key
    `V` - type of the stream item
  All Implemented Interfaces:
    Map.Entry<K,V>

      public final class TimestampedEntry<K,V>
      extends Object
      implements Map.Entry<K,V>

  A `Map.Entry` extended with a `long timestamp`, used for event time-based data processing.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `TimestampedEntry(long timestamp, K key, V value)` Constructs a timestamped entry with the supplied field values.

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `equals(Object obj)`
    `static <K,V> TimestampedEntry<K,V>` | `fromWindowResult(long winStart, long winEnd, K key, V value)` This method matches the shape of the functional interface `KeyedWindowResultFunction`.
    `K` | `getKey()`
    `long` | `getTimestamp()` Returns the timestamp of this entry.
    `V` | `getValue()`
    `int` | `hashCode()`
    `V` | `setValue(V value)`
    `String` | `toString()`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

    - ### Methods inherited from interface java.util.Map.Entry

      `comparingByKey, comparingByKey, comparingByValue, comparingByValue`

- - ### Constructor Detail

    - #### TimestampedEntry

          public TimestampedEntry(long timestamp,
                                  @Nonnull
                                  K key,
                                  @Nonnull
                                  V value)

      Constructs a timestamped entry with the supplied field values.

  - ### Method Detail

    - #### getTimestamp

          public long getTimestamp()

      Returns the timestamp of this entry.

    - #### getKey

          @Nonnull
          public K getKey()

      Specified by:
        `getKey` in interface `Map.Entry<K,V>`

    - #### getValue

          @Nonnull
          public V getValue()

      Specified by:
        `getValue` in interface `Map.Entry<K,V>`

    - #### setValue

          public V setValue(V value)

      Specified by:
        `setValue` in interface `Map.Entry<K,V>`

    - #### hashCode

          public int hashCode()

      Specified by:
        `hashCode` in interface `Map.Entry<K,V>`
      Overrides:
        `hashCode` in class `Object`

    - #### equals

          public boolean equals(Object obj)

      Specified by:
        `equals` in interface `Map.Entry<K,V>`
      Overrides:
        `equals` in class `Object`

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

    - #### fromWindowResult

          public static <K,V> TimestampedEntry<K,V> fromWindowResult(long winStart,
                                                                     long winEnd,
                                                                     @Nonnull
                                                                     K key,
                                                                     @Nonnull
                                                                     V value)

      This method matches the shape of the functional interface `KeyedWindowResultFunction`.

      Constructs a `TimestampedEntry` using the window end time as the timestamp.

Copyright © 2018. All rights reserved.