All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.graylog.plugins.views.search.engine.AutoValue_QueryPosition Maven / Gradle / Ivy

There is a newer version: 6.0.1
Show newest version
package org.graylog.plugins.views.search.engine;

import javax.annotation.processing.Generated;

@Generated("com.google.auto.value.processor.AutoValueProcessor")
final class AutoValue_QueryPosition extends QueryPosition {

  private final int beginLine;

  private final int beginColumn;

  private final int endLine;

  private final int endColumn;

  private AutoValue_QueryPosition(
      int beginLine,
      int beginColumn,
      int endLine,
      int endColumn) {
    this.beginLine = beginLine;
    this.beginColumn = beginColumn;
    this.endLine = endLine;
    this.endColumn = endColumn;
  }

  @Override
  public int beginLine() {
    return beginLine;
  }

  @Override
  public int beginColumn() {
    return beginColumn;
  }

  @Override
  public int endLine() {
    return endLine;
  }

  @Override
  public int endColumn() {
    return endColumn;
  }

  @Override
  public String toString() {
    return "QueryPosition{"
        + "beginLine=" + beginLine + ", "
        + "beginColumn=" + beginColumn + ", "
        + "endLine=" + endLine + ", "
        + "endColumn=" + endColumn
        + "}";
  }

  @Override
  public boolean equals(Object o) {
    if (o == this) {
      return true;
    }
    if (o instanceof QueryPosition) {
      QueryPosition that = (QueryPosition) o;
      return this.beginLine == that.beginLine()
          && this.beginColumn == that.beginColumn()
          && this.endLine == that.endLine()
          && this.endColumn == that.endColumn();
    }
    return false;
  }

  @Override
  public int hashCode() {
    int h$ = 1;
    h$ *= 1000003;
    h$ ^= beginLine;
    h$ *= 1000003;
    h$ ^= beginColumn;
    h$ *= 1000003;
    h$ ^= endLine;
    h$ *= 1000003;
    h$ ^= endColumn;
    return h$;
  }

  static final class Builder extends QueryPosition.Builder {
    private Integer beginLine;
    private Integer beginColumn;
    private Integer endLine;
    private Integer endColumn;
    Builder() {
    }
    @Override
    public QueryPosition.Builder beginLine(int beginLine) {
      this.beginLine = beginLine;
      return this;
    }
    @Override
    public QueryPosition.Builder beginColumn(int beginColumn) {
      this.beginColumn = beginColumn;
      return this;
    }
    @Override
    public QueryPosition.Builder endLine(int endLine) {
      this.endLine = endLine;
      return this;
    }
    @Override
    public QueryPosition.Builder endColumn(int endColumn) {
      this.endColumn = endColumn;
      return this;
    }
    @Override
    public QueryPosition build() {
      String missing = "";
      if (this.beginLine == null) {
        missing += " beginLine";
      }
      if (this.beginColumn == null) {
        missing += " beginColumn";
      }
      if (this.endLine == null) {
        missing += " endLine";
      }
      if (this.endColumn == null) {
        missing += " endColumn";
      }
      if (!missing.isEmpty()) {
        throw new IllegalStateException("Missing required properties:" + missing);
      }
      return new AutoValue_QueryPosition(
          this.beginLine,
          this.beginColumn,
          this.endLine,
          this.endColumn);
    }
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy