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

brooklyn.mementos.TreeNode Maven / Gradle / Ivy

There is a newer version: 0.7.0-M1
Show newest version
package brooklyn.mementos;

import java.util.List;

/**
 * A simple tree structure, where a node references a parent and children using their ids.
 * 
 * e.g. could be used to represent the entity hierarchy within mementos, where the 
 * String is the id of parent/child entities.
 * 
 * @author aled
 */
public interface TreeNode {

    /**
     * The id of this node in the tree. This id will be used by the parent's getChildren(), 
     * and by each child's getParent().
     */
    String getId();
    
    /**
     * The id of the parent entity, or null if none.
     */
    String getParent();
    
    /**
     * The ids of the children.
     */
    List getChildren();
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy