- 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 String
CLEAR_SCREEN_ESCAPE_SEQUENCE
ConstantCLEAR_SCREEN_ESCAPE_SEQUENCE="\033[2J\033[1;1H"
static String
ERASE_LINE_ESCAPE_SEQUENCE
ConstantERASE_LINE_ESCAPE_SEQUENCE="\033[K"
protected boolean
exiting
static String
LINE_SEPARATOR
ConstantLINE_SEPARATOR="StringUtil.repeat(LINE_SEPARATOR_CHAR, "{trunked}
static char
LINE_SEPARATOR_CHAR
ConstantLINE_SEPARATOR_CHAR='*'
-
Constructor Summary
Constructors Constructor Description Console()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Console
box(int padding, String... lines)
box.Console
box(String... lines)
box.Console
clearScreen()
clearScreen.Console
emptyLine()
emptyLine.Console
emptyLine(int number)
emptyLine.Console
eraseLine()
eraseLine.boolean
exiting()
exiting.Console
goodbye()
goodbye.boolean
isRunning()
isRunning.Console
print(Object data)
print.Console
print(String data)
print.Console
print(String format, Object... args)
print.Console
println()
println.Console
println(char character, int repeat)
println.Console
println(Object line)
println.Console
println(String line)
println.Console
println(String format, Object... args)
println.Console
promptForExit()
promptForExit.Console
separatorLine()
separatorLine.Console
separatorLine(char character)
separatorLine.Console
separatorLine(char character, int length)
separatorLine.Console
title(String... title)
title.void
waitForExit()
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
Console
object.
-
emptyLine
public Console emptyLine(int number)
emptyLine.
- Parameters:
number
- a int.- Returns:
- a
Console
object.
-
separatorLine
public Console separatorLine(char character)
separatorLine.
- Parameters:
character
- a char.- Returns:
- a
Console
object.
-
separatorLine
public Console separatorLine(char character, int length)
separatorLine.
- Parameters:
character
- a char.length
- a int.- Returns:
- a
Console
object.
-
waitForExit
public void waitForExit() throws InterruptedException
waitForExit.
- Throws:
InterruptedException
- if any.
-
exiting
public boolean exiting()
exiting.
- Returns:
- a boolean.
-
isRunning
public boolean isRunning()
isRunning.
- Returns:
- a boolean.
-
-