Interface History.Entry

All Known Implementing Classes:
DefaultHistory.EntryImpl
Enclosing interface:
History

public static interface History.Entry
Represents a single history entry containing a command line and its metadata.

Each entry in the history has an index position, a timestamp indicating when it was added, and the actual command line text.

  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Returns the index of this entry in the history.
    Returns the command line text of this entry.
    Returns the timestamp when this entry was added to the history.
  • Method Details

    • index

      int index()
      Returns the index of this entry in the history.
      Returns:
      the index position of this entry
    • time

      Instant time()
      Returns the timestamp when this entry was added to the history.
      Returns:
      the timestamp of this entry
    • line

      String line()
      Returns the command line text of this entry.
      Returns:
      the command line text