/* * Copyright (c) 2021 PANTHEON.tech, s.r.o. and others. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0 which accompanies this distribution, * and is available at http://www.eclipse.org/legal/epl-v10.html */ package org.opendaylight.yangtools.concepts; import static com.google.common.base.Preconditions.checkArgument; import com.google.common.annotations.Beta; import java.util.function.Supplier; import org.eclipse.jdt.annotation.NonNull; /** * A capture of a tree-like construct, which can be formatted into a pretty-printed tree. The string can be acquired * via {@link #get()}. * *
* This concept is purposefully designed as an abstract class which defers its {@link #toString()} to {@link #get()}, as * it allows convenient and light-weight use with logging: * *
*
* PrettyTreeAware treeLike;
* LOG.debug("Tree is {}", treeLike.prettyTree());
*
*
*/
@Beta
public abstract class PrettyTree implements Supplier