All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.link_intersystems.graph.tree.TreeModel Maven / Gradle / Ivy

Go to download

There is a newer version: 1.9.7
Show newest version
package com.link_intersystems.graph.tree;

import java.util.stream.Stream;

/**
 * A {@link TreeModel} describes a tree structure on objects.
 *
 * @author René Link {@literal }
 */
public interface TreeModel {

    /**
     * An object that can be used as a root object in case you don't have one.
     */
    public static final Object DEFAULT_ROOT = new Object();

    Stream getChildren(T parent);

    default 

boolean hasChildren(P parent) { return getChildren(parent).findFirst().isPresent(); } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy