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

com.therouter.plugin.Node Maven / Gradle / Ivy

There is a newer version: 1.2.3-rc1
Show newest version
package com.therouter.plugin;

import java.util.HashSet;
import java.util.Objects;
import java.util.Set;

public class Node {
    private final String name;
    private Set children = new HashSet<>();

    public Node(String name) {
        this.name = name;
    }

    public String getName() {
        return name;
    }

    public Set getChildren() {
        return children;
    }

    public void setChildren(Set children) {
        this.children = children;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (!(o instanceof Node)) return false;
        Node node = (Node) o;
        return Objects.equals(getName(), node.getName());
    }

    @Override
    public int hashCode() {
        return Objects.hash(getName());
    }

    @Override
    public String toString() {
        return name;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy