com.github.moaxcp.graphs.events.VertexPropertyUpdated Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of graphs Show documentation
Show all versions of graphs Show documentation
dynamic graphs supporting streams and an EventBus
package com.github.moaxcp.graphs.events;
import static java.util.Objects.requireNonNull;
import java.util.Objects;
public final class VertexPropertyUpdated extends VertexPropertyEvent {
private final Object oldValue;
private VertexPropertyUpdated(Builder builder) {
super(builder);
oldValue = requireNonNull(builder.oldValue);
}
public Object getOldValue() {
return oldValue;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
VertexPropertyUpdated that = (VertexPropertyUpdated) o;
return Objects.equals(getGraphId(), that.getGraphId()) &&
Objects.equals(getVertexId(), that.getVertexId()) &&
Objects.equals(getName(), that.getName()) &&
Objects.equals(getValue(), that.getValue()) &&
Objects.equals(oldValue, that.oldValue);
}
@Override
public int hashCode() {
return Objects.hash(getGraphId(), getVertexId(), getName(), getValue(), oldValue);
}
@SuppressWarnings("squid:S2176")
public static final class Builder extends VertexPropertyEvent.Builder> {
private Object oldValue;
@Override
public Builder self() {
return this;
}
public Builder oldValue(Object oldValue) {
this.oldValue = oldValue;
return this;
}
@Override
public VertexPropertyUpdated build() {
return new VertexPropertyUpdated<>(this);
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy