Interface History

All Superinterfaces:
Iterable<History.Entry>
All Known Subinterfaces:
PersistentHistory
All Known Implementing Classes:
FileHistory, MemoryHistory

public interface History extends Iterable<History.Entry>
Console history.
Since:
2.3
Author:
Marc Prud'hommeaux, Jason Dillon
  • Method Details

    • size

      int size()
    • isEmpty

      boolean isEmpty()
    • index

      int index()
    • clear

      void clear()
    • get

      CharSequence get(int index)
    • add

      void add(CharSequence line)
    • set

      void set(int index, CharSequence item)
      Set the history item at the given index to the given CharSequence.
      Parameters:
      index - the index of the history offset
      item - the new item
      Since:
      2.7
    • remove

      CharSequence remove(int i)
      Remove the history element at the given index.
      Parameters:
      i - the index of the element to remove
      Returns:
      the removed element
      Since:
      2.7
    • removeFirst

      CharSequence removeFirst()
      Remove the first element from history.
      Returns:
      the removed element
      Since:
      2.7
    • removeLast

      CharSequence removeLast()
      Remove the last element from history
      Returns:
      the removed element
      Since:
      2.7
    • replace

      void replace(CharSequence item)
    • entries

      ListIterator<History.Entry> entries(int index)
    • entries

    • iterator

      Iterator<History.Entry> iterator()
      Specified by:
      iterator in interface Iterable<History.Entry>
    • current

      CharSequence current()
    • previous

      boolean previous()
    • next

      boolean next()
    • moveToFirst

      boolean moveToFirst()
    • moveToLast

      boolean moveToLast()
    • moveTo

      boolean moveTo(int index)
    • moveToEnd

      void moveToEnd()