/*
 * Copyright (c) 2002-2018, the original author or authors.
 *
 * This software is distributable under the BSD license. See the terms of the
 * BSD license in the documentation provided with this software.
 *
 * https://opensource.org/licenses/BSD-3-Clause
 */
package jdk.internal.org.jline.reader;

import java.util.List;

ParsedLine objects are returned by the Parser during completion or when accepting the line. The instances should implement the CompletingParsedLine interface so that escape chars and quotes can be correctly handled.
See Also:
/** * <code>ParsedLine</code> objects are returned by the {@link Parser} * during completion or when accepting the line. * * The instances should implement the {@link CompletingParsedLine} * interface so that escape chars and quotes can be correctly handled. * * @see Parser * @see CompletingParsedLine */
public interface ParsedLine {
The current word being completed. If the cursor is after the last word, an empty string is returned.
Returns:the word being completed or an empty string
/** * The current word being completed. * If the cursor is after the last word, an empty string is returned. * * @return the word being completed or an empty string */
String word();
The cursor position within the current word.
Returns:the cursor position within the current word
/** * The cursor position within the current word. * * @return the cursor position within the current word */
int wordCursor();
The index of the current word in the list of words.
Returns:the index of the current word in the list of words
/** * The index of the current word in the list of words. * * @return the index of the current word in the list of words */
int wordIndex();
The list of words.
Returns:the list of words
/** * The list of words. * * @return the list of words */
List<String> words();
The unparsed line.
Returns:the unparsed line
/** * The unparsed line. * * @return the unparsed line */
String line();
The cursor position within the line.
Returns:the cursor position within the line
/** * The cursor position within the line. * * @return the cursor position within the line */
int cursor(); }