|
Scala 2
|
object
Console
extends
java.lang.Object with
ScalaObjectConsole
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.Constructor Summary | |
def
this
|
Def Summary | |
def
flush
: scala.Unit
Flush the output stream. This function is required when partial output (i.e. output not terminated by a new line character) has to be made visible on the terminal. |
|
def
print
( obj : scala.Any )
: scala.Unit
Print an object on the terminal. |
|
def
printf
( text : java.lang.String ) ( args : scala.<repeated> )
: scala.Unit
Format and print out some text (in a fashion similar to printf in C). The format of the text to print is specified by the parameter 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.
|
|
def
println
( x : scala.Any )
: scala.Unit
Print out an object followed by a new line character. |
|
def
println
: scala.Unit
Print a new line character on the terminal. |
|
def
readBoolean
: scala.Boolean
Read a boolean value from the terminal. |
|
def
readByte
: scala.Byte
Read a byte value from the terminal. |
|
def
readChar
: scala.Char
Read a char value from the terminal. |
|
def
readDouble
: scala.Double
Read a double value from the terminal. |
|
def
readFloat
: scala.Float
Read a float value from the terminal. |
|
def
readInt
: scala.Int
Read an int value from the terminal. |
|
def
readLine
: java.lang.String
Read a full line from the terminal. |
|
def
readShort
: scala.Short
Read a short value from the terminal. |
|
def
readf
( format : java.lang.String )
: List
Read in some structured input, specified by a format specifier. See class java.text.MessageFormat for details of
the format specification.
|
|
def
readf1
( format : java.lang.String )
: scala.Any
Read in some structured input, specified by a format specifier. Opposed to readf , this function only returns the
first value extracted from the input according to the format
specification.
|
|
def
readf2
( format : java.lang.String )
: Tuple2
Read in some structured input, specified by a format specifier. Opposed to readf , this function only returns the
first two values extracted from the input according to the format
specification.
|
|
def
readf3
( format : java.lang.String )
: Tuple3
Read in some structured input, specified by a format specifier. Opposed to readf , this function only returns the
first three values extracted from the input according to the format
specification.
|
|
def
setIn
( in : java.io.InputStream )
: scala.Unit
Set the default input stream. |
|
def
setIn
( reader : java.io.Reader )
: scala.Unit
Set the default input stream. |
|
def
setOut
( out : java.io.PrintStream )
: scala.Unit
Set the default output stream. |
Constructor Detail |
def
this
Def Detail |
def
flush
: scala.Unit
def
print
( obj : scala.Any ) : scala.Unit
def
printf
( text : java.lang.String ) ( args : scala.<repeated> ) : scala.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.def
println
( x : scala.Any ) : scala.Unit
def
println
: scala.Unit
def
readBoolean
: scala.Boolean
def
readByte
: scala.Byte
def
readChar
: scala.Char
def
readDouble
: scala.Double
def
readFloat
: scala.Float
def
readInt
: scala.Int
def
readLine
: java.lang.String
def
readShort
: scala.Short
def
readf
( format : java.lang.String ) : List
java.text.MessageFormat
for details of
the format specification.def
readf1
( format : java.lang.String ) : scala.Any
readf
, this function only returns the
first value extracted from the input according to the format
specification.def
readf2
( format : java.lang.String ) : Tuple2
readf
, this function only returns the
first two values extracted from the input according to the format
specification.def
readf3
( format : java.lang.String ) : Tuple3
readf
, this function only returns the
first three values extracted from the input according to the format
specification.def
setIn
( in : java.io.InputStream ) : scala.Unit
def
setIn
( reader : java.io.Reader ) : scala.Unit
def
setOut
( out : java.io.PrintStream ) : scala.Unit