dev.cel.common.navigation.AutoValue_CelNavigableExpr Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of validators Show documentation
Show all versions of validators Show documentation
Common Expression Language Validators for Java
The newest version!
package dev.cel.common.navigation;
import dev.cel.common.ast.CelExpr;
import java.util.Optional;
// Generated by com.google.auto.value.processor.AutoValueProcessor
final class AutoValue_CelNavigableExpr extends CelNavigableExpr {
private final CelExpr expr;
private final Optional parent;
private final int depth;
private final int height;
private AutoValue_CelNavigableExpr(
CelExpr expr,
Optional parent,
int depth,
int height) {
this.expr = expr;
this.parent = parent;
this.depth = depth;
this.height = height;
}
@Override
public CelExpr expr() {
return expr;
}
@Override
public Optional parent() {
return parent;
}
@Override
public int depth() {
return depth;
}
@Override
public int height() {
return height;
}
@Override
public String toString() {
return "CelNavigableExpr{"
+ "expr=" + expr + ", "
+ "parent=" + parent + ", "
+ "depth=" + depth + ", "
+ "height=" + height
+ "}";
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (o instanceof CelNavigableExpr) {
CelNavigableExpr that = (CelNavigableExpr) o;
return this.expr.equals(that.expr())
&& this.parent.equals(that.parent())
&& this.depth == that.depth()
&& this.height == that.height();
}
return false;
}
@Override
public int hashCode() {
int h$ = 1;
h$ *= 1000003;
h$ ^= expr.hashCode();
h$ *= 1000003;
h$ ^= parent.hashCode();
h$ *= 1000003;
h$ ^= depth;
h$ *= 1000003;
h$ ^= height;
return h$;
}
@Override
public CelNavigableExpr.Builder toBuilder() {
return new Builder(this);
}
static final class Builder extends CelNavigableExpr.Builder {
private CelExpr expr;
private Optional parent = Optional.empty();
private int depth;
private int height;
private byte set$0;
Builder() {
}
private Builder(CelNavigableExpr source) {
this.expr = source.expr();
this.parent = source.parent();
this.depth = source.depth();
this.height = source.height();
set$0 = (byte) 3;
}
@Override
public CelNavigableExpr.Builder setExpr(CelExpr expr) {
if (expr == null) {
throw new NullPointerException("Null expr");
}
this.expr = expr;
return this;
}
@Override
public CelExpr expr() {
if (this.expr == null) {
throw new IllegalStateException("Property \"expr\" has not been set");
}
return expr;
}
@Override
CelNavigableExpr.Builder setParent(CelNavigableExpr parent) {
this.parent = Optional.of(parent);
return this;
}
@Override
public CelNavigableExpr.Builder setDepth(int depth) {
this.depth = depth;
set$0 |= (byte) 1;
return this;
}
@Override
public int depth() {
if ((set$0 & 1) == 0) {
throw new IllegalStateException("Property \"depth\" has not been set");
}
return depth;
}
@Override
public CelNavigableExpr.Builder setHeight(int height) {
this.height = height;
set$0 |= (byte) 2;
return this;
}
@Override
public CelNavigableExpr build() {
if (set$0 != 3
|| this.expr == null) {
StringBuilder missing = new StringBuilder();
if (this.expr == null) {
missing.append(" expr");
}
if ((set$0 & 1) == 0) {
missing.append(" depth");
}
if ((set$0 & 2) == 0) {
missing.append(" height");
}
throw new IllegalStateException("Missing required properties:" + missing);
}
return new AutoValue_CelNavigableExpr(
this.expr,
this.parent,
this.depth,
this.height);
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy