Package org.jline.reader.impl
Class LineReaderImpl.CompletingWord
- java.lang.Object
-
- org.jline.reader.impl.LineReaderImpl.CompletingWord
-
- All Implemented Interfaces:
CompletingParsedLine
,ParsedLine
- Enclosing class:
- LineReaderImpl
private static class LineReaderImpl.CompletingWord extends java.lang.Object implements CompletingParsedLine
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.String
word
-
Constructor Summary
Constructors Constructor Description CompletingWord(java.lang.String word)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
cursor()
The cursor position within the line.java.lang.CharSequence
escape(java.lang.CharSequence candidate, boolean complete)
java.lang.String
line()
The unparsed line.int
rawWordCursor()
int
rawWordLength()
java.lang.String
word()
The current word being completed.int
wordCursor()
The cursor position within the current word.int
wordIndex()
The index of the current word in the list of words.java.util.List<java.lang.String>
words()
The list of words.
-
-
-
Method Detail
-
escape
public java.lang.CharSequence escape(java.lang.CharSequence candidate, boolean complete)
- Specified by:
escape
in interfaceCompletingParsedLine
-
rawWordCursor
public int rawWordCursor()
- Specified by:
rawWordCursor
in interfaceCompletingParsedLine
-
rawWordLength
public int rawWordLength()
- Specified by:
rawWordLength
in interfaceCompletingParsedLine
-
word
public java.lang.String word()
Description copied from interface:ParsedLine
The current word being completed. If the cursor is after the last word, an empty string is returned.- Specified by:
word
in interfaceParsedLine
- Returns:
- the word being completed or an empty string
-
wordCursor
public int wordCursor()
Description copied from interface:ParsedLine
The cursor position within the current word.- Specified by:
wordCursor
in interfaceParsedLine
- Returns:
- the cursor position within the current word
-
wordIndex
public int wordIndex()
Description copied from interface:ParsedLine
The index of the current word in the list of words.- Specified by:
wordIndex
in interfaceParsedLine
- Returns:
- the index of the current word in the list of words
-
words
public java.util.List<java.lang.String> words()
Description copied from interface:ParsedLine
The list of words.- Specified by:
words
in interfaceParsedLine
- Returns:
- the list of words
-
line
public java.lang.String line()
Description copied from interface:ParsedLine
The unparsed line.- Specified by:
line
in interfaceParsedLine
- Returns:
- the unparsed line
-
cursor
public int cursor()
Description copied from interface:ParsedLine
The cursor position within the line.- Specified by:
cursor
in interfaceParsedLine
- Returns:
- the cursor position within the line
-
-