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

com.sri.ai.util.collect.LazyTree Maven / Gradle / Ivy

There is a newer version: 1.3.3
Show newest version
package com.sri.ai.util.collect;

import java.util.Iterator;

import com.sri.ai.util.base.NullaryFunction;

/**
 * The interface for the nodes of lazily created trees.
 * A node is associated with information of type E and
 * an iterator for thunks ({@link NullaryFunction});
 * each of these thunks must return a subtree of the node.
 * 
 * @author braz
 *
 * @param 
 */
interface LazyTree {

	/**
	 * Returns this node's information
	 * @return this node's information
	 */
	E getInformation();
	
	/**
	 * An iterator of thunks creating this node's sub-trees.
	 * Leaves must return an empty iterator.
	 * @return An iterator of thunks creating this node's sub-trees
	 * (the iterator will have no next element if the node is a information).
	 */
	Iterator>> getSubTreeMakers();
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy