- java.lang.Object
-
- com.pi4j.util.Console
-
public class Console extends Object
Console class.
- Version:
- $Id: $Id
- Author:
- Robert Savage (http://www.savagehomeautomation.com)
-
-
Field Summary
Fields Modifier and Type Field Description static StringCLEAR_SCREEN_ESCAPE_SEQUENCEConstantCLEAR_SCREEN_ESCAPE_SEQUENCE="\033[2J\033[1;1H"static StringERASE_LINE_ESCAPE_SEQUENCEConstantERASE_LINE_ESCAPE_SEQUENCE="\033[K"protected booleanexitingstatic StringLINE_SEPARATORConstantLINE_SEPARATOR="StringUtil.repeat(LINE_SEPARATOR_CHAR, "{trunked}static charLINE_SEPARATOR_CHARConstantLINE_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)box.Consolebox(String... lines)box.ConsoleclearScreen()clearScreen.ConsoleemptyLine()emptyLine.ConsoleemptyLine(int number)emptyLine.ConsoleeraseLine()eraseLine.booleanexiting()exiting.Consolegoodbye()goodbye.booleanisRunning()isRunning.Consoleprint(Object data)print.Consoleprint(String data)print.Consoleprint(String format, Object... args)print.Consoleprintln()println.Consoleprintln(char character, int repeat)println.Consoleprintln(Object line)println.Consoleprintln(String line)println.Consoleprintln(String format, Object... args)println.ConsolepromptForExit()promptForExit.ConsoleseparatorLine()separatorLine.ConsoleseparatorLine(char character)separatorLine.ConsoleseparatorLine(char character, int length)separatorLine.Consoletitle(String... title)title.voidwaitForExit()waitForExit.
-
-
-
Field Detail
-
CLEAR_SCREEN_ESCAPE_SEQUENCE
public static final String CLEAR_SCREEN_ESCAPE_SEQUENCE
ConstantCLEAR_SCREEN_ESCAPE_SEQUENCE="\033[2J\033[1;1H"- See Also:
- Constant Field Values
-
ERASE_LINE_ESCAPE_SEQUENCE
public static final String ERASE_LINE_ESCAPE_SEQUENCE
ConstantERASE_LINE_ESCAPE_SEQUENCE="\033[K"- See Also:
- Constant Field Values
-
LINE_SEPARATOR_CHAR
public static final char LINE_SEPARATOR_CHAR
ConstantLINE_SEPARATOR_CHAR='*'- See Also:
- Constant Field Values
-
LINE_SEPARATOR
public static final String LINE_SEPARATOR
ConstantLINE_SEPARATOR="StringUtil.repeat(LINE_SEPARATOR_CHAR, "{trunked}
-
exiting
protected boolean exiting
-
-
Method Detail
-
println
public Console println(char character, int repeat)
println.
- Parameters:
character- a char.repeat- a int.- Returns:
- a
Consoleobject.
-
emptyLine
public Console emptyLine(int number)
emptyLine.
- Parameters:
number- a int.- Returns:
- a
Consoleobject.
-
separatorLine
public Console separatorLine(char character)
separatorLine.
- Parameters:
character- a char.- Returns:
- a
Consoleobject.
-
separatorLine
public Console separatorLine(char character, int length)
separatorLine.
- Parameters:
character- a char.length- a int.- Returns:
- a
Consoleobject.
-
waitForExit
public void waitForExit() throws InterruptedExceptionwaitForExit.
- Throws:
InterruptedException- if any.
-
exiting
public boolean exiting()
exiting.
- Returns:
- a boolean.
-
isRunning
public boolean isRunning()
isRunning.
- Returns:
- a boolean.
-
-