jline

Class ArgumentCompletor.ArgumentList

Enclosing Class:
ArgumentCompletor

public static class ArgumentCompletor.ArgumentList
extends java.lang.Object

The result of a delimited buffer.
Author:
Marc Prud'hommeaux

Field Summary

private int
argumentPosition
private String[]
arguments
private int
bufferPosition
private int
cursorArgumentIndex

Constructor Summary

ArgumentList(String[] arguments, int cursorArgumentIndex, int argumentPosition, int bufferPosition)

Method Summary

int
getArgumentPosition()
String[]
getArguments()
int
getBufferPosition()
String
getCursorArgument()
int
getCursorArgumentIndex()
void
setArgumentPosition(int argumentPosition)
void
setArguments(String[] arguments)
void
setBufferPosition(int bufferPosition)
void
setCursorArgumentIndex(int cursorArgumentIndex)

Field Details

argumentPosition

private int argumentPosition

arguments

private String[] arguments

bufferPosition

private int bufferPosition

cursorArgumentIndex

private int cursorArgumentIndex

Constructor Details

ArgumentList

public ArgumentList(String[] arguments,
                    int cursorArgumentIndex,
                    int argumentPosition,
                    int bufferPosition)
Parameters:
arguments - the array of tokens
cursorArgumentIndex - the token index of the cursor
argumentPosition - the position of the cursor in the current token
bufferPosition - the position of the cursor in the whole buffer

Method Details

getArgumentPosition

public int getArgumentPosition()

getArguments

public String[] getArguments()

getBufferPosition

public int getBufferPosition()

getCursorArgument

public String getCursorArgument()

getCursorArgumentIndex

public int getCursorArgumentIndex()

setArgumentPosition

public void setArgumentPosition(int argumentPosition)

setArguments

public void setArguments(String[] arguments)

setBufferPosition

public void setBufferPosition(int bufferPosition)

setCursorArgumentIndex

public void setCursorArgumentIndex(int cursorArgumentIndex)