Package org.jline.reader.impl.history
Class DefaultHistory.EntryImpl
java.lang.Object
org.jline.reader.impl.history.DefaultHistory.EntryImpl
- All Implemented Interfaces:
History.Entry
- Enclosing class:
DefaultHistory
Default implementation of the
History.Entry
interface.
This class represents a single history entry with an index, timestamp, and command text.
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
EntryImpl
Creates a new history entry with the specified index, timestamp, and line.- Parameters:
index
- the index of the entry in the historytime
- the timestamp of the entryline
- the content of the entry
-
-
Method Details
-
index
public int index()Description copied from interface:History.Entry
Returns the index of this entry in the history.- Specified by:
index
in interfaceHistory.Entry
- Returns:
- the index position of this entry
-
time
Description copied from interface:History.Entry
Returns the timestamp when this entry was added to the history.- Specified by:
time
in interfaceHistory.Entry
- Returns:
- the timestamp of this entry
-
line
Description copied from interface:History.Entry
Returns the command line text of this entry.- Specified by:
line
in interfaceHistory.Entry
- Returns:
- the command line text
-
toString
-