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

org.aksw.commons.collections.trees.Tree Maven / Gradle / Ivy

There is a newer version: 0.9.9
Show newest version
package org.aksw.commons.collections.trees;

import java.util.Collection;
import java.util.List;

/**
 * Maybe a tree is an IndirectTree, so that each node represents itself?
 * @author raven
 *
 * @param 
 */
public interface Tree {
    T getRoot();
    Collection getChildren(T node);
    T getParent(T node);

    /**
     * Copies a given node thereby setting the provided children as its children.
     *
     * @param node
     * @param children
     * @return A copy of the given node with the children set appropriately
     */
    T copy(T node, List children);

    //TreeOps getOps();

    //boolean contains(Object node);
    Tree createNew(T root);

    long nodeCount();
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy