001 package net.databinder.components.tree.data;
002
003 import java.util.Collection;
004
005 /**
006 * Classes used as the concrete type of a {@link net.databinder.components.tree.hib.DataTree},
007 * i.e., the type of objects being represented by the tree nodes, must implement this interface.
008 *
009 * @author Thomas Kappler
010 *
011 * @param <T>
012 * the concrete type this tree node is representing
013 */
014 public interface DataTreeObject<T> {
015
016 /**
017 * @return the children of this tree node
018 */
019 public Collection<T> getChildren();
020
021 /** Add new child node */
022 public void addChild(T child);
023
024 /**
025 * @return the parent of this tree node
026 */
027 public T getParent();
028
029 }