Package com.pi4j.util
Class Console
- java.lang.Object
-
- com.pi4j.util.Console
-
public class Console extends Object
-
-
Field Summary
Fields Modifier and Type Field Description static StringCLEAR_SCREEN_ESCAPE_SEQUENCEstatic StringERASE_LINE_ESCAPE_SEQUENCEprotected booleanexitingstatic StringLINE_SEPARATORstatic charLINE_SEPARATOR_CHAR
-
Constructor Summary
Constructors Constructor Description Console()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Consolebox(int padding, String... lines)Consolebox(String... lines)ConsoleclearScreen()ConsoleemptyLine()ConsoleemptyLine(int number)ConsoleeraseLine()voidexit()booleanexiting()Consolegoodbye()booleanisRunning()Consoleprint(Object data)Consoleprint(String data)Consoleprint(String format, Object... args)Consoleprintln()Consoleprintln(char character, int repeat)Consoleprintln(Object line)Consoleprintln(String line)Consoleprintln(String format, Object... args)ConsolepromptForExit()ConsoleseparatorLine()ConsoleseparatorLine(char character)ConsoleseparatorLine(char character, int length)Consoletitle(String... title)voidwaitForExit()
-
-
-
Field Detail
-
CLEAR_SCREEN_ESCAPE_SEQUENCE
public static final String CLEAR_SCREEN_ESCAPE_SEQUENCE
- See Also:
- Constant Field Values
-
ERASE_LINE_ESCAPE_SEQUENCE
public static final String ERASE_LINE_ESCAPE_SEQUENCE
- See Also:
- Constant Field Values
-
LINE_SEPARATOR_CHAR
public static final char LINE_SEPARATOR_CHAR
- See Also:
- Constant Field Values
-
LINE_SEPARATOR
public static final String LINE_SEPARATOR
-
exiting
protected boolean exiting
-
-
Method Detail
-
println
public Console println()
-
println
public Console println(char character, int repeat)
-
emptyLine
public Console emptyLine()
-
emptyLine
public Console emptyLine(int number)
-
separatorLine
public Console separatorLine()
-
separatorLine
public Console separatorLine(char character)
-
separatorLine
public Console separatorLine(char character, int length)
-
goodbye
public Console goodbye()
-
clearScreen
public Console clearScreen()
-
eraseLine
public Console eraseLine()
-
promptForExit
public Console promptForExit()
-
waitForExit
public void waitForExit() throws InterruptedException- Throws:
InterruptedException
-
exiting
public boolean exiting()
-
isRunning
public boolean isRunning()
-
exit
public void exit()
-
-