hydra.langs.cypher.openCypher.RangeLiteral Maven / Gradle / Ivy
package hydra.langs.cypher.openCypher;
import java.io.Serializable;
public class RangeLiteral implements Serializable {
public static final hydra.core.Name NAME = new hydra.core.Name("hydra/langs/cypher/openCypher.RangeLiteral");
public final java.util.Optional from;
public final java.util.Optional to;
public RangeLiteral (java.util.Optional from, java.util.Optional to) {
this.from = from;
this.to = to;
}
@Override
public boolean equals(Object other) {
if (!(other instanceof RangeLiteral)) {
return false;
}
RangeLiteral o = (RangeLiteral) (other);
return from.equals(o.from) && to.equals(o.to);
}
@Override
public int hashCode() {
return 2 * from.hashCode() + 3 * to.hashCode();
}
public RangeLiteral withFrom(java.util.Optional from) {
return new RangeLiteral(from, to);
}
public RangeLiteral withTo(java.util.Optional to) {
return new RangeLiteral(from, to);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy