- All Known Implementing Classes:
DogOctave
,DogScaleSpace
,GaussianOctave
,GaussianScaleSpace
,HierarchicalScaleSpace
,ScaleOctave
public interface PrintsToStream
Classes which require a complex toString()
method should implement this interface, which requires the single
method printToStream(PrintStream)
, e.g.,
public void printToStream(PrintStream strm) { strm.format("...", ...); }
Note that this interface cannot override the default Object.toString()
method directly. If needed, this
should be done in the implementing class by using the pre-defined printToString()
method:
public String toString() { return printToString(); }
- Version:
- 2021/09/17
-
Method Summary
Modifier and TypeMethodDescriptionvoid
printToStream
(PrintStream strm) This method writes a description of this object to the specifiedPrintStream
.default String
Convenience method to save some boilerplate code.
-
Method Details
-
printToStream
This method writes a description of this object to the specifiedPrintStream
.- Parameters:
strm
- the output stream to print to
-
printToString
Convenience method to save some boilerplate code. CallsprintToStream(PrintStream)
to produce a description string for this object. TheprintToString()
method can also be used by implementing classes to override the standardObject.toString()
method, e.g.,@Override public String toString() { return this.printToString(); }
- Returns:
- the string representation of this object as defined by
printToStream(PrintStream)
-