jline.console.history
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

Nested Class Summary
static interface History.Entry
           
 
Method Summary
 void add(CharSequence line)
           
 void clear()
           
 CharSequence current()
           
 ListIterator<History.Entry> entries()
           
 ListIterator<History.Entry> entries(int index)
           
 CharSequence get(int index)
           
 int index()
           
 boolean isEmpty()
           
 Iterator<History.Entry> iterator()
           
 boolean moveTo(int index)
           
 void moveToEnd()
           
 boolean moveToFirst()
           
 boolean moveToLast()
           
 boolean next()
           
 boolean previous()
           
 CharSequence remove(int i)
          Remove the history element at the given index.
 CharSequence removeFirst()
          Remove the first element from history.
 CharSequence removeLast()
          Remove the last element from history
 void replace(CharSequence item)
           
 void set(int index, CharSequence item)
          Set the history item at the given index to the given CharSequence.
 int size()
           
 

Method Detail

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

ListIterator<History.Entry> 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()


Copyright © 2013. All Rights Reserved.