// Path: public-java/io/iamcontent-usb/src/main/java/com/iamcontent/io/usb/license/License.java
// public static void displayLicense() {
// 	for (String s : MINIMAL_TERMS)
// 		System.out.println(s);
// }
// 
// Path: public-java/io/iamcontent-usb/src/main/java/com/iamcontent/io/usb/UsbRuntimeException.java
// public class UsbRuntimeException extends RuntimeException {
// 	public UsbRuntimeException(String message) {
// 		super(message);
// 	}
// 
// 	public UsbRuntimeException(Throwable cause) {
// 		super(cause);
// 	}
// 	
// 	private static final long serialVersionUID = 1L;
// }


import static com.iamcontent.io.usb.license.License.displayLicense;
import java.io.IOException;
import java.util.function.Predicate;
import javax.usb.UsbDevice;
import javax.usb.UsbHub;
import com.iamcontent.io.usb.UsbRuntimeException;

		this(VISIT_ALL_DEVICES, System.out);
	}

	public UsbTopologyTreePrinter(Predicate<UsbDevice> shouldVisit, Appendable out) {
		super(shouldVisit);
		this.out = out;
	}

	public static void main(String[] args) {
		displayLicense();
		final UsbTopologyTreePrinter printer = new UsbTopologyTreePrinter();
		printer.exploreRootUsbHub();
	}
	
	@Override
	protected void exploreDescendants(UsbHub hub) {
		increasePadding();
		super.exploreDescendants(hub);
		decreasePadding();
	}
	
	@Override
	public void visit(UsbDevice usbDevice) {
		appendQuietly(out, padding + usbDevice.toString() + "\n");
	}
	
	public static void appendQuietly(Appendable out, String s) {
		try {
			out.append(s);
		} catch (IOException e) {

// Path: public-java/io/iamcontent-usb/src/main/java/com/iamcontent/io/usb/license/License.java
// public static void displayLicense() {
// 	for (String s : MINIMAL_TERMS)
// 		System.out.println(s);
// }
// 
// Path: public-java/io/iamcontent-usb/src/main/java/com/iamcontent/io/usb/UsbRuntimeException.java
// public class UsbRuntimeException extends RuntimeException {
// 	public UsbRuntimeException(String message) {
// 		super(message);
// 	}
// 
// 	public UsbRuntimeException(Throwable cause) {
// 		super(cause);
// 	}
// 	
// 	private static final long serialVersionUID = 1L;
// }


// Path: public-java/io/iamcontent-usb/src/main/java/com/iamcontent/io/usb/topology/UsbTopologyTreePrinter.java
import static com.iamcontent.io.usb.license.License.displayLicense;
import java.io.IOException;
import java.util.function.Predicate;
import javax.usb.UsbDevice;
import javax.usb.UsbHub;
import com.iamcontent.io.usb.UsbRuntimeException;

		this(VISIT_ALL_DEVICES, System.out);
	}

	public UsbTopologyTreePrinter(Predicate<UsbDevice> shouldVisit, Appendable out) {
		super(shouldVisit);
		this.out = out;
	}

	public static void main(String[] args) {
		displayLicense();
		final UsbTopologyTreePrinter printer = new UsbTopologyTreePrinter();
		printer.exploreRootUsbHub();
	}
	
	@Override
	protected void exploreDescendants(UsbHub hub) {
		increasePadding();
		super.exploreDescendants(hub);
		decreasePadding();
	}
	
	@Override
	public void visit(UsbDevice usbDevice) {
		appendQuietly(out, padding + usbDevice.toString() + "\n");
	}
	
	public static void appendQuietly(Appendable out, String s) {
		try {
			out.append(s);
		} catch (IOException e) {

			throw new UsbRuntimeException(e);
