public interface History extends Iterable<History.Entry>
| Modifier and Type | Interface and Description |
|---|---|
static interface |
History.Entry |
| Modifier and Type | Method and Description |
|---|---|
void |
add(Instant time,
String line) |
default void |
add(String line) |
void |
attach(LineReader reader)
Initialize the history for the given reader.
|
String |
current()
Return the content of the current buffer.
|
int |
first() |
String |
get(int index) |
int |
index() |
default boolean |
isEmpty() |
default ListIterator<History.Entry> |
iterator() |
ListIterator<History.Entry> |
iterator(int index) |
int |
last() |
void |
load()
Load history.
|
boolean |
moveTo(int index)
Move to the specified index in the history
|
void |
moveToEnd()
Move to the end of the history buffer.
|
boolean |
moveToFirst()
Moves the history index to the first entry.
|
boolean |
moveToLast()
This moves the history to the last entry.
|
boolean |
next()
Move the pointer to the next element in the buffer.
|
boolean |
previous()
Move the pointer to the previous element in the buffer.
|
void |
purge()
Purge history.
|
void |
save()
Save history.
|
int |
size() |
forEach, spliteratorvoid attach(LineReader reader)
void load() throws IOException
IOExceptionvoid save() throws IOException
IOExceptionvoid purge()
throws IOException
IOExceptionint size()
default boolean isEmpty()
int index()
int first()
int last()
String get(int index)
default void add(String line)
ListIterator<History.Entry> iterator(int index)
default ListIterator<History.Entry> iterator()
iterator in interface Iterable<History.Entry>String current()
boolean previous()
boolean next()
boolean moveToFirst()
boolean moveToLast()
boolean moveTo(int index)
void moveToEnd()
Copyright © 2017. All rights reserved.