|
Scala
1.4.0.3 |
|||
Console
object implements functionality for
printing Scala values on the terminal. There are also functions
for reading specific values. Console
also defines
constants for marking up text on ANSI terminals.
Field Summary | |
final
|
val BLACK: String
|
final
|
val BLACK_B: String
|
final
|
val BLINK: String
|
final
|
val BLUE: String
|
final
|
val BLUE_B: String
|
final
|
val BOLD: String
|
final
|
val CYAN: String
|
final
|
val CYAN_B: String
|
final
|
val GREEN: String
|
final
|
val GREEN_B: String
|
final
|
val INVISIBLE: String
|
final
|
val MAGENTA: String
|
final
|
val MAGENTA_B: String
|
final
|
val RED: String
|
final
|
val RED_B: String
|
final
|
val RESET: String
|
final
|
val REVERSED: String
|
final
|
val UNDERLINED: String
|
final
|
val WHITE: String
|
final
|
val WHITE_B: String
|
final
|
val YELLOW: String
|
final
|
val YELLOW_B: String
|
Method Summary | |
final
|
def flush: Unit
Flush the output stream. |
final
|
def print(obj: Any): Unit
Print an object on the terminal. |
final
|
def printf(text: String)(args: Any*): Unit
Format and print out some text (in a fashion similar to printf in C). |
final
|
def println: Unit
Print a new line character on the terminal. |
final
|
def println(x: Any): Unit
Print out an object followed by a new line character. |
final
|
def readBoolean: Boolean
Read a boolean value from the terminal. |
final
|
def readByte: Byte
Read a byte value from the terminal. |
final
|
def readChar: Char
Read a char value from the terminal. |
final
|
def readDouble: Double
Read a double value from the terminal. |
final
|
def readFloat: Float
Read a float value from the terminal. |
final
|
def readInt: Int
Read an int value from the terminal. |
final
|
def readLine: String
Read a full line from the terminal. |
final
|
def readShort: Short
Read a short value from the terminal. |
final
|
def readf(format: String): List[Any]
Read in some structured input, specified by a format specifier. |
final
|
def readf1(format: String): Any
Read in some structured input, specified by a format specifier. |
final
|
def readf2(format: String): Tuple2[Any,Any]
Read in some structured input, specified by a format specifier. |
final
|
def readf3(format: String): Tuple3[Any,Any,Any]
Read in some structured input, specified by a format specifier. |
final
|
def setIn(in: java.io.InputStream): Unit
Set the default input stream. |
final
|
def setIn(reader: java.io.Reader): Unit
Set the default input stream. |
final
|
def setOut(out: java.io.PrintStream): Unit
Set the default output stream. |
Field Detail |
final val BLACK: String
final val RED: String
final val GREEN: String
final val YELLOW: String
final val BLUE: String
final val MAGENTA: String
final val CYAN: String
final val WHITE: String
final val BLACK_B: String
final val RED_B: String
final val GREEN_B: String
final val YELLOW_B: String
final val BLUE_B: String
final val MAGENTA_B: String
final val CYAN_B: String
final val WHITE_B: String
final val RESET: String
final val BOLD: String
final val UNDERLINED: String
final val BLINK: String
final val REVERSED: String
final val INVISIBLE: String
Method Detail |
final def setOut(out: java.io.PrintStream): Unit
out
-
the new output stream.
final def setIn(in: java.io.InputStream): Unit
in
-
the new input stream.
final def setIn(reader: java.io.Reader): Unit
reader
-
specifies the new input stream.
final def print(obj: Any): Unit
obj
-
the object to print.
final def flush: Unit
final def println: Unit
final def println(x: Any): Unit
x
-
the object to print.
final def printf(text: String)(args: Any*): Unit
text
. The arguments that are inserted into specific
locations in text
are provided with parameter
args
. See class java.text.MessageFormat
for a full specification of the format syntax.
text
-
the format of the text to print out.
args
-
the parameters used to instantiate the format.
final def readLine: String
final def readBoolean: Boolean
final def readByte: Byte
final def readShort: Short
final def readChar: Char
final def readInt: Int
final def readFloat: Float
final def readDouble: Double
final def readf(format: String): List[Any]
java.text.MessageFormat
for details of
the format specification.
format
-
the format of the input.
final def readf1(format: String): Any
readf
, this function only returns the
first value extracted from the input according to the format
specification.
final def readf2(format: String): Tuple2[Any,Any]
readf
, this function only returns the
first two values extracted from the input according to the format
specification.
final def readf3(format: String): Tuple3[Any,Any,Any]
readf
, this function only returns the
first three values extracted from the input according to the format
specification.
|
Scala
1.4.0.3 |
|||