Screen.java, a class to simplify Java output.
Default Screen constructorReturns nothing, but I am ready for use.
println() displays a newline.Precondition: System.out is open;
Postcondition: a newline has been appended to System.out.
Return: the receiver
print(Object) displays an object using its toString() method.Receives: an object to print.
Precondition: obj has defined method toString()
Postcondition: obj's String representation has been displayed.
Return: the receiver
println(Object) displays an object using its toString() method.Receives: an object to print.
Precondition: obj has defined method toString()
Postcondition: obj's String representation has been displayed, followed by a newline.
Return: the receiver
print(char) displays a char.Receives: a character to print.
Precondition: System.out is open; value is a char.
Postcondition: value has been appended to System.out.
Return: the receiver
println(char) displays a char followed by a newline.Receives: a character to print.
Precondition: System.out is open; value is a char.
Postcondition: value and a newline have been appended to System.out.
Return: the receiver
print(string) displays a string.Receives: a string to print.
Precondition: System.out is open; value is a string.
Postcondition: value has been appended to System.out.
Return: the receiver
println(string) displays a string followed by a newline.Receives: a string to print.
Precondition: System.out is open; value is a string.
Postcondition: value and a newline have been appended to System.out.
Return: the receiver
print(boolean) displays a boolean.Receives: a boolean to print.
Precondition: System.out is open; value is a boolean.
Postcondition: value has been appended to System.out.
Return: the receiver
println(boolean) displays a boolean followed by a newline.Receives: a boolean to print.
Precondition: System.out is open; value is a boolean.
Postcondition: value and a newline have been appended to System.out.
Return: the receiver
print(byte) displays a byte.Receives: a byte to print.
Precondition: System.out is open; value is a byte.
Postcondition: value has been appended to System.out.
Return: the receiver
println(byte) displays a byte followed by a newline.Receives: a byte to print.
Precondition: System.out is open; value is a byte.
Postcondition: value and a newline have been appended to System.out.
Return: the receiver
print(short) displays a short.Receives: a short integer to print.
Precondition: System.out is open; value is a short.
Postcondition: value has been appended to System.out.
Return: the receiver
println(short) displays a short followed by a newline.Receives: a short integer to print.
Precondition: System.out is open; value is a short.
Postcondition: value and a newline have been appended to System.out.
Return: the receiver
print(int) displays an int.Receives: an integer to print.
Precondition: System.out is open; value is an int.
Postcondition: value has been appended to System.out.
Return: the receiver
println(int) displays an int followed by a newline.Receives: an integer to print.
Precondition: System.out is open; value is an int.
Postcondition: value and a newline have been appended to System.out.
Return: the receiver
print(long) displays a short.Receives: a long integer to print.
Precondition: System.out is open; value is a long.
Postcondition: value has been appended to System.out.
Return: the receiver
println(long) displays a long followed by a newline.Receives: a long integer to print.
Precondition: System.out is open; value is a long.
Postcondition: value and a newline have been appended to System.out.
Return: the receiver
print(float) displays a float.Receives: a floating point value to print.
Precondition: System.out is open; value is a float.
Postcondition: value has been appended to System.out.
Return: the receiver
println(float) displays a float followed by a newline.Receives: a floating point value to print.
Precondition: System.out is open; value is a float.
Postcondition: value and a newline have been appended to System.out.
Return: the receiver
print(double) displays a double.Receives: a double precision floating point value to print.
Precondition: System.out is open; value is a double.
Postcondition: value has been appended to System.out.
Return: the receiver
println(double) displays a double followed by a newline.Receives: a double precision floating point value to print.
Precondition: System.out is open; value is a double.
Postcondition: value and a newline have been appended to System.out.
Return: the receiver
printFormatted(double) displays a double using the default format.Receives: a double precision floating point value to print.
Precondition: System.out is open; value is a double.
Postcondition: value has been appended to System.out.
Return: the receiver
printFormatted(double, int) displays a double with a given number of decimal digits.Receives: value, a double, decimalDigits, an int.
Precondition: System.out is open; value is a double; decimalDigits > 0.
Postcondition: value has been appended to System.out, with decimalDigits right of the decimal.
Return: the receiver
printFormatted(double, int, int) displays a double with a given number of places left and right of the decimal.Receives: value, a double; integerPlaces, an int; decimalDigits, an int
Precondition: System.out is open; integerPlaces > 0 && decimalDigits > 0.
Postcondition: value has been appended to System.out, with integerPlaces left of the decimal (leading zeros replaced by blanks), and decimalDigits to the right of the decimal.
Return: the receiver
printFormatted(double, int, int, char) displays a double with a given number of integer and decimal places.Receives: value, a double; integerDigits, an int; decimalDigits, an int; fillChar, a char.
Precondition: System.out is open; integerPlaces > 0 && decimalDigits > 0.
Postcondition: value has been appended to System.out, with integerDigits left of the decimal(leading zeros and separators replaced by fillChar), and decimalDigits to the right of the decimal.
Return: the receiver
Back to the package documentation index