com.github.andyshao.data.structure.Tree Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of Gear Show documentation
Show all versions of Gear Show documentation
Enhance and formating the coding of JDK
The newest version!
package com.github.andyshao.data.structure;
import com.github.andyshao.lang.Cleanable;
import java.io.Serializable;
/**
* Tree
* @param data type
* @param Node type
*/
public interface Tree> extends Cleanable, Serializable {
/**
* Tree node
* @param data type
*/
public interface TreeNode extends Serializable {
/**
* Get the data
* @return the data
*/
public DATA data();
/**
* Set the data
* @param data the data
*/
public void data(DATA data);
}
@Override
public abstract void clear();
/**
* The root {@link TreeNode}
* @return {@link TreeNode}
*/
public abstract N root();
/**
* Set teh root {@link TreeNode}
* @param node {@link TreeNode}
*/
public abstract void root(N node);
/**
* Get the size number of the {@link Tree}
* @return the size number
*/
public abstract int size();
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy