com.therouter.plugin.Node.groovy Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of plugin Show documentation
Show all versions of plugin Show documentation
Android 动态路由库-移动端模块化解决方案
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;
}
}