Package components.simplewriter
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 TypeMethodDescriptionvoid
print
(boolean b) AppendsTO_STRING(b)
to the end ofthis.content
.void
print
(char c) Appends<c>
to the end ofthis.content
.void
print
(double d) AppendsTO_STRING(d)
to the end ofthis.content
.void
print
(double d, int precision, boolean scientific) AppendsTO_STRING(d, precision, scientific)
to the end ofthis.content
.void
print
(int i) AppendsTO_STRING(i)
to the end ofthis.content
.void
print
(long x) AppendsTO_STRING(x)
to the end ofthis.content
.void
Appends the string representation ofo
to the end ofthis.content
.void
Appendss
to the end ofthis.content
.void
println()
Appends a line separator to the end ofthis.content
.void
println
(boolean b) AppendsTO_STRING(b)
and a line separator to the end ofthis.content
.void
println
(char c) Appends<c>
and a line separator to the end ofthis.content
.void
println
(double d) AppendsTO_STRING(d)
and a line separator to the end ofthis.content
.void
println
(double d, int precision, boolean scientific) AppendsTO_STRING(d, precision, scientific)
and a line separator to the end ofthis.content
.void
println
(int i) AppendsTO_STRING(i)
and a line separator to the end ofthis.content
.void
println
(long x) AppendsTO_STRING(x)
and a line separator to the end ofthis.content
.void
Appends the string representation ofo
and a line separator to the end ofthis.content
.void
Appendss
and a line separator to the end ofthis.content
.Methods inherited from interface components.simplewriter.SimpleWriterKernel
close, isOpen, name, write
Methods inherited from interface components.standard.Standard
clear, newInstance, transferFrom
-
Method Details
-
print
Appendss
to the end ofthis.content
.- Parameters:
s
- the string to output- Updates:
this.content
- Requires:
this.is_open
- Ensures:
this.content = #this.content * s
-
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
Appends the string representation ofo
to the end ofthis.content
.- Parameters:
o
- the Object to output- Updates:
this.content
- Requires:
this.is_open
- Ensures:
this.content = #this.content * to_string(o)
-
println
Appendss
and a line separator to the end ofthis.content
.- Parameters:
s
- the string to output- Updates:
this.content
- Requires:
this.is_open
- Ensures:
this.content = #this.content * s * LINE_SEPARATOR
-
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
Appends the string representation ofo
and a line separator to the end ofthis.content
.- Parameters:
o
- the Object to output- Updates:
this.content
- Requires:
this.is_open
- Ensures:
this.content = #this.content * to_string(o) * LINE_SEPARATOR
-