Interface SimpleWriter
- All Superinterfaces:
AutoCloseable, SimpleWriterKernel, Standard<SimpleWriter>
- All Known Implementing Classes:
SimpleWriter1L, SimpleWriterSecondary
SimpleWriterKernel enhanced with secondary methods.- Mathematical Definitions:
LINE_SEPARATOR: string of character is [character(s) used to denote line separator on the local system]
-
Method Summary
Modifier and TypeMethodDescriptionvoidprint(boolean b) AppendsTO_STRING(b)to the end ofthis.content.voidprint(char c) Appends<c>to the end ofthis.content.voidprint(double d) AppendsTO_STRING(d)to the end ofthis.content.voidprint(double d, int precision, boolean scientific) AppendsTO_STRING(d, precision, scientific)to the end ofthis.content.voidprint(int i) AppendsTO_STRING(i)to the end ofthis.content.voidprint(long x) AppendsTO_STRING(x)to the end ofthis.content.voidAppends the string representation ofoto the end ofthis.content.voidAppendssto the end ofthis.content.voidprintln()Appends a line separator to the end ofthis.content.voidprintln(boolean b) AppendsTO_STRING(b)and a line separator to the end ofthis.content.voidprintln(char c) Appends<c>and a line separator to the end ofthis.content.voidprintln(double d) AppendsTO_STRING(d)and a line separator to the end ofthis.content.voidprintln(double d, int precision, boolean scientific) AppendsTO_STRING(d, precision, scientific)and a line separator to the end ofthis.content.voidprintln(int i) AppendsTO_STRING(i)and a line separator to the end ofthis.content.voidprintln(long x) AppendsTO_STRING(x)and a line separator to the end ofthis.content.voidAppends the string representation ofoand a line separator to the end ofthis.content.voidAppendssand a line separator to the end ofthis.content.Methods inherited from interface SimpleWriterKernel
close, isOpen, name, writeMethods inherited from interface Standard
clear, newInstance, transferFrom
-
Method Details
-
print
-
print
AppendsTO_STRING(i)to the end ofthis.content.- Parameters:
i- the integer to output- Updates:
this.content- Requires:
this.is_open- Ensures:
this.content = #this.content * TO_STRING(i)
-
print
AppendsTO_STRING(x)to the end ofthis.content.- Parameters:
x- the long to output- Updates:
this.content- Requires:
this.is_open- Ensures:
this.content = #this.content * TO_STRING(x)
-
print
AppendsTO_STRING(d)to the end ofthis.content.- Parameters:
d- the double to output- Updates:
this.content- Requires:
this.is_open- Ensures:
this.content = #this.content * TO_STRING(d)
-
print
AppendsTO_STRING(d, precision, scientific)to the end ofthis.content.- Parameters:
d- the double to outputprecision- the number of decimal digits printedscientific- whether to use scientific notation or not- Updates:
this.content- Requires:
this.is_open and precision >= 0- Ensures:
this.content = #this.content * TO_STRING(d, precision, scientific)
-
print
AppendsTO_STRING(b)to the end ofthis.content.- Parameters:
b- the boolean to output- Updates:
this.content- Requires:
this.is_open- Ensures:
this.content = #this.content * TO_STRING(b)
-
print
Appends<c>to the end ofthis.content.- Parameters:
c- the character to output- Updates:
this.content- Requires:
this.is_open- Ensures:
this.content = #this.content * <c>
-
print
-
println
-
println
AppendsTO_STRING(i)and a line separator to the end ofthis.content.- Parameters:
i- the integer to output- Updates:
this.content- Requires:
this.is_open- Ensures:
this.content = #this.content * TO_STRING(i) * LINE_SEPARATOR
-
println
AppendsTO_STRING(x)and a line separator to the end ofthis.content.- Parameters:
x- the long to output- Updates:
this.content- Requires:
this.is_open- Ensures:
this.content = #this.content * TO_STRING(x) * LINE_SEPARATOR
-
println
AppendsTO_STRING(d)and a line separator to the end ofthis.content.- Parameters:
d- the double to output- Updates:
this.content- Requires:
this.is_open- Ensures:
this.content = #this.content * TO_STRING(d) * LINE_SEPARATOR
-
println
AppendsTO_STRING(d, precision, scientific)and a line separator to the end ofthis.content.- Parameters:
d- the double to outputprecision- the number of decimal digits printedscientific- whether to use scientific notation or not- Updates:
this.content- Requires:
this.is_open and precision >= 0- Ensures:
this.content = #this.content * TO_STRING(d, precision, scientific) * LINE_SEPARATOR
-
println
AppendsTO_STRING(b)and a line separator to the end ofthis.content.- Parameters:
b- the boolean to output- Updates:
this.content- Requires:
this.is_open- Ensures:
this.content = #this.content * TO_STRING(b) * LINE_SEPARATOR
-
println
Appends<c>and a line separator to the end ofthis.content.- Parameters:
c- the character to output- Updates:
this.content- Requires:
this.is_open- Ensures:
this.content = #this.content * <c> * LINE_SEPARATOR
-
println
void println()Appends a line separator to the end ofthis.content.- Updates:
this.content- Requires:
this.is_open- Ensures:
this.content = #this.content * LINE_SEPARATOR
-
println
-