- java.lang.Object
-
- org.jline.reader.impl.completer.ArgumentCompleter.ArgumentLine
-
- All Implemented Interfaces:
ParsedLine
- Enclosing class:
- ArgumentCompleter
public static class ArgumentCompleter.ArgumentLine extends Object implements ParsedLine
-
-
Constructor Summary
Constructors Constructor Description ArgumentLine(String word, int cursor)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcursor()The cursor position within the line.Stringline()The unparsed line.Stringword()The current word being completed.intwordCursor()The cursor position within the current word.intwordIndex()The index of the current word in the list of words.List<String>words()The list of words.
-
-
-
Constructor Detail
-
ArgumentLine
public ArgumentLine(String word, int cursor)
-
-
Method Detail
-
word
public String word()
Description copied from interface:ParsedLineThe current word being completed. If the cursor is after the last word, an empty string is returned.- Specified by:
wordin interfaceParsedLine- Returns:
- the word being completed or an empty string
-
wordCursor
public int wordCursor()
Description copied from interface:ParsedLineThe cursor position within the current word.- Specified by:
wordCursorin interfaceParsedLine- Returns:
- the cursor position within the current word
-
wordIndex
public int wordIndex()
Description copied from interface:ParsedLineThe index of the current word in the list of words.- Specified by:
wordIndexin interfaceParsedLine- Returns:
- the index of the current word in the list of words
-
words
public List<String> words()
Description copied from interface:ParsedLineThe list of words.- Specified by:
wordsin interfaceParsedLine- Returns:
- the list of words
-
line
public String line()
Description copied from interface:ParsedLineThe unparsed line.- Specified by:
linein interfaceParsedLine- Returns:
- the unparsed line
-
cursor
public int cursor()
Description copied from interface:ParsedLineThe cursor position within the line.- Specified by:
cursorin interfaceParsedLine- Returns:
- the cursor position within the line
-
-