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

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      int index()
      Returns the index of this entry in the history.
      java.lang.String line()
      Returns the command line text of this entry.
      java.time.Instant time()
      Returns the timestamp when this entry was added to the history.
    • Method Detail

      • index

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

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

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