org.reploop.parser.json.tree.ByteVal Maven / Gradle / Ivy
package org.reploop.parser.json.tree;
import org.reploop.parser.json.AstVisitor;
import java.util.Objects;
public class ByteVal extends Number {
private final byte value;
public ByteVal(byte value) {
this.value = value;
}
@Override
public R accept(AstVisitor visitor, C context) {
return visitor.visitByte(this, context);
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
ByteVal byteVal = (ByteVal) o;
return value == byteVal.value;
}
@Override
public String toString() {
return String.valueOf(value);
}
@Override
public int hashCode() {
return Objects.hash(value);
}
}