Interface History

All Superinterfaces:
Iterable<History.Entry>
All Known Implementing Classes:
DefaultHistory

public interface History extends Iterable<History.Entry>
Console command history management interface.

The History interface provides functionality for storing, retrieving, and navigating through previously entered commands. It allows users to recall and reuse commands they've typed before, which is a fundamental feature of interactive command-line interfaces.

History implementations typically support:

  • Adding new entries as commands are executed
  • Navigating backward and forward through history
  • Persisting history to a file for use across sessions
  • Filtering or ignoring certain commands based on patterns

Each history entry contains the command text along with metadata such as the timestamp when it was executed.

The default implementation is DefaultHistory.

Since:
2.3
See Also: