Package jline.console.history
Interface History
-
- All Superinterfaces:
java.lang.Iterable<History.Entry>
- All Known Subinterfaces:
PersistentHistory
- All Known Implementing Classes:
FileHistory
,MemoryHistory
public interface History extends java.lang.Iterable<History.Entry>
Console history.- Since:
- 2.3
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
History.Entry
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
add(java.lang.CharSequence line)
void
clear()
java.lang.CharSequence
current()
java.util.ListIterator<History.Entry>
entries()
java.util.ListIterator<History.Entry>
entries(int index)
java.lang.CharSequence
get(int index)
int
index()
boolean
isEmpty()
java.util.Iterator<History.Entry>
iterator()
boolean
moveTo(int index)
void
moveToEnd()
boolean
moveToFirst()
boolean
moveToLast()
boolean
next()
boolean
previous()
java.lang.CharSequence
remove(int i)
Remove the history element at the given index.java.lang.CharSequence
removeFirst()
Remove the first element from history.java.lang.CharSequence
removeLast()
Remove the last element from historyvoid
replace(java.lang.CharSequence item)
void
set(int index, java.lang.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
java.lang.CharSequence get(int index)
-
add
void add(java.lang.CharSequence line)
-
set
void set(int index, java.lang.CharSequence item)
Set the history item at the given index to the given CharSequence.- Parameters:
index
- the index of the history offsetitem
- the new item- Since:
- 2.7
-
remove
java.lang.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
java.lang.CharSequence removeFirst()
Remove the first element from history.- Returns:
- the removed element
- Since:
- 2.7
-
removeLast
java.lang.CharSequence removeLast()
Remove the last element from history- Returns:
- the removed element
- Since:
- 2.7
-
replace
void replace(java.lang.CharSequence item)
-
entries
java.util.ListIterator<History.Entry> entries(int index)
-
entries
java.util.ListIterator<History.Entry> entries()
-
iterator
java.util.Iterator<History.Entry> iterator()
- Specified by:
iterator
in interfacejava.lang.Iterable<History.Entry>
-
current
java.lang.CharSequence current()
-
previous
boolean previous()
-
next
boolean next()
-
moveToFirst
boolean moveToFirst()
-
moveToLast
boolean moveToLast()
-
moveTo
boolean moveTo(int index)
-
moveToEnd
void moveToEnd()
-
-