public final class History extends Object
Constructor and Description |
---|
History(byte[] text)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
boolean |
active()
Indicates if the history is active.
|
int |
caret()
Returns the caret position.
|
boolean |
first()
Checks if the history points to the first entry.
|
void |
init(byte[] text)
Initializes the history with a text.
|
boolean |
last()
Checks if the history points to the last entry.
|
boolean |
modified()
Checks if the file has been modified.
|
byte[] |
next()
Returns the next string and increases the pointer, or returns
null . |
byte[] |
prev()
Returns the previous string and decreases the pointer, or returns
null . |
void |
save()
Sets the saved position.
|
void |
store(byte[] str,
int oc,
int nc)
Stores a string in the history.
|
public void init(byte[] text)
text
- initial textpublic boolean active()
public boolean first()
public boolean last()
public byte[] prev()
null
.public byte[] next()
null
.public int caret()
public void store(byte[] str, int oc, int nc)
str
- string to be storedoc
- old caret positionnc
- new caret positionpublic void save()
public boolean modified()
Copyright © 2005–2015 BaseX Team. All rights reserved.