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

api.ChildTree Maven / Gradle / Ivy

The newest version!
package api;

import java.util.List;
import java.util.Objects;

/**
 * Represents hierarchical collection of child nodes of a Tree
 */
public interface ChildTree{
    Node getParent();
    void setParent(Node parent);
    List> getNodes();

    default boolean isEqual(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        ChildTree that = (ChildTree) o;
        return Objects.equals(getNodes(), that.getNodes());
    }

    default int getHashCode(){
        return Objects.hash(getNodes());
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy