com.hazelcast.jet.datamodel

## Class TimestampedItem<T>

- java.lang.Object
- - com.hazelcast.jet.datamodel.TimestampedItem<T>

- Type Parameters:
    `T` -

      public class TimestampedItem<T>
      extends Object

  Mutable wrapper around an item that adds a timestamp. Useful for LRU caching.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `TimestampedItem(long timestamp, T item)` Creates a new timestamped item.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `equals(Object obj)`
    `int` | `hashCode()`
    `T` | `item()` Returns the item.
    `TimestampedItem<T>` | `setItem(T item)` Sets the item.
    `TimestampedItem<T>` | `setTimestamp(long timestamp)` Sets the timestamp.
    `long` | `timestamp()` Returns the timestamp.
    `String` | `toString()`

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

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

- - ### Constructor Detail

    - #### TimestampedItem

          public TimestampedItem(long timestamp,
                                 T item)

      Creates a new timestamped item.

  - ### Method Detail

    - #### timestamp

          public long timestamp()

      Returns the timestamp.

    - #### item

          public T item()

      Returns the item.

    - #### setTimestamp

          public TimestampedItem<T> setTimestamp(long timestamp)

      Sets the timestamp.
      Returns:
        `this`

    - #### setItem

          public TimestampedItem<T> setItem(T item)

      Sets the item.
      Returns:
        `this`

    - #### equals

          public boolean equals(Object obj)

      Overrides:
        `equals` in class `Object`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

Copyright © 2019. All rights reserved.