
jdeps.StringDependency Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jdeps Show documentation
Show all versions of jdeps Show documentation
Java library for simple in-memory topological sorts.
package jdeps;
public class StringDependency implements IDependency {
private final String name;
public StringDependency(String name) {
if (name == null)
throw new IllegalArgumentException("name cannot be null");
this.name = name;
}
public String getName() {
return name;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
StringDependency that = (StringDependency) o;
if (!name.equals(that.name)) return false;
return true;
}
@Override
public String toString() {
return name;
}
@Override
public int hashCode() {
return name.hashCode();
}
public static IDependency from(String name) {
return new StringDependency(name);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy