com.daioware.stream.PrinterItem Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of log Show documentation
Show all versions of log Show documentation
Log and stream utilities
The newest version!
package com.daioware.stream;
public class PrinterItem implements Printer{
private Printer printer;
public PrinterItem() {
this(System.out::println);
}
public PrinterItem(Printer printer) {
this.printer = printer;
}
public Printer getPrinter() {
return printer;
}
public void setPrinter(Printer printer) {
if(printer==null) {
this.printer=Printer.emptyPrinter;
}
else {
this.printer = printer;
}
}
public void println(Object o) {
printer.println(o);
}
public void print(Object o) {
printer.println(o);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy