Class NJLineCmdLineHistory
java.lang.Object
net.thevpc.nuts.ext.term.NJLineCmdLineHistory
- All Implemented Interfaces:
NCmdLineHistory,NComponent,NScorable
- Author:
- thevpc
-
Field Summary
Fields inherited from interface net.thevpc.nuts.util.NScorable
CUSTOM_SCORE, DEFAULT_SCORE, UNSUPPORTED_SCORE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidgetEntry(int index) getPath()org.jline.reader.LineReaderintgetScore(NScorableContext context) protected voidinternalAdd(Instant time, String line) iterator(int index) voidload()voidload(InputStream in) protected booleanmatchPatterns(String patterns, String line) voidpurge()voidsave()voidsave(OutputStream out) voidsetReader(org.jline.reader.LineReader reader) intsize()protected voidtrimHistory(Path path, int max)
-
Constructor Details
-
NJLineCmdLineHistory
public NJLineCmdLineHistory()
-
-
Method Details
-
getReader
public org.jline.reader.LineReader getReader() -
setReader
public void setReader(org.jline.reader.LineReader reader) -
setPath
- Specified by:
setPathin interfaceNCmdLineHistory
-
setPath
- Specified by:
setPathin interfaceNCmdLineHistory
-
setPath
- Specified by:
setPathin interfaceNCmdLineHistory
-
getPath
- Specified by:
getPathin interfaceNCmdLineHistory
-
getScore
- Specified by:
getScorein interfaceNComponent- Specified by:
getScorein interfaceNScorable
-
load
- Specified by:
loadin interfaceNCmdLineHistory
-
load
public void load()- Specified by:
loadin interfaceNCmdLineHistory
-
save
- Specified by:
savein interfaceNCmdLineHistory
-
save
public void save()- Specified by:
savein interfaceNCmdLineHistory
-
size
public int size()- Specified by:
sizein interfaceNCmdLineHistory
-
purge
public void purge()- Specified by:
purgein interfaceNCmdLineHistory
-
trimHistory
- Throws:
IOException
-
add
- Specified by:
addin interfaceNCmdLineHistory
-
matchPatterns
-
internalAdd
-
getEntry
- Specified by:
getEntryin interfaceNCmdLineHistory
-
iterator
- Specified by:
iteratorin interfaceNCmdLineHistory
-