public class Alpaca extends Object implements AutoCloseable
Constructor and Description |
---|
Alpaca() |
Modifier and Type | Method and Description |
---|---|
void |
checkInit()
Method to handle sanity checks for the Alpaca
|
void |
close() |
AlpacaConsole |
getConsole() |
ConsoleEventSubscriber |
getConsoleEventSubscriber() |
Location |
getCurrentLocation() |
PrintStream |
getPrintStreamOut() |
Root |
getRoot() |
jline.console.completer.AggregateCompleter |
getTabCompleter() |
TaskManager |
getTaskManager() |
void |
initialize()
This method is used to initialize an Alpaca Object using the default system output
|
void |
initialize(InputStream inputStream,
OutputStream outputStream)
This method is used to initialize an Alpaca Object using the specified output and input streams
|
boolean |
isRunning() |
int |
parseCommand(List<String> commands)
Handles command strings by parsing them and designating the correct
designation
|
void |
println(String s)
Prints a string followed by a newline to the console
|
void |
runCommandLineInterface()
This method initializes Alpaca and runs the Command Line Interface.
|
void |
setAggregateCompleter(jline.console.completer.AggregateCompleter aggregateCompleter) |
void |
setCurrentLocation(Location currentLocation) |
void |
setRoot(Root root) |
public boolean isRunning()
public Root getRoot()
public void setRoot(Root root)
public Location getCurrentLocation()
public void setCurrentLocation(Location currentLocation)
public PrintStream getPrintStreamOut()
public AlpacaConsole getConsole()
public TaskManager getTaskManager()
public ConsoleEventSubscriber getConsoleEventSubscriber()
public jline.console.completer.AggregateCompleter getTabCompleter()
public void setAggregateCompleter(jline.console.completer.AggregateCompleter aggregateCompleter)
public void checkInit() throws AlpacaException
AlpacaException
- Thrown if the console is null.public void initialize()
public void initialize(InputStream inputStream, OutputStream outputStream)
inputStream
- The inputstream to useoutputStream
- The outputstream to usepublic void close()
close
in interface AutoCloseable
public int parseCommand(List<String> commands) throws AlpacaException
commands
- The arraylist of commands.AlpacaException
- Thrown if Alpaca was not initialized successfullypublic void println(String s)
s
- The string to printpublic void runCommandLineInterface()
Copyright © 2017 ECG. All rights reserved.