org.jungrapht.visualization.layout.util.synthetics.SVI Maven / Gradle / Ivy
The newest version!
package org.jungrapht.visualization.layout.util.synthetics;
import java.util.Objects;
/**
* Implementation of a delegate class for a generic type V
*
* @param vertex type
*/
public class SVI implements SV {
public final V vertex;
protected SVI() {
this.vertex = null;
}
protected SVI(V vertex) {
this.vertex = vertex;
}
public SVI(SVI other) {
this(other.vertex);
}
@Override
public V getVertex() {
return vertex;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
SVI> se = (SVI>) o;
if (o instanceof SyntheticSV) {
return false;
}
return Objects.equals(vertex, se.vertex);
}
@Override
public int hashCode() {
return Objects.hash(vertex);
}
@Override
public String toString() {
return "SV{" + "vertex=" + vertex + '}';
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy