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

com.hubspot.chrome.devtools.client.core.css.SourceRange Maven / Gradle / Ivy

package com.hubspot.chrome.devtools.client.core.css;

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;

/**
 * Text range within a resource. All numbers are zero-based.
 */
public final class SourceRange {
  private Integer startLine;

  private Integer startColumn;

  private Integer endLine;

  private Integer endColumn;

  @JsonCreator
  public SourceRange(@JsonProperty("startLine") Integer startLine,
      @JsonProperty("startColumn") Integer startColumn, @JsonProperty("endLine") Integer endLine,
      @JsonProperty("endColumn") Integer endColumn) {
    this.startLine = startLine;
    this.startColumn = startColumn;
    this.endLine = endLine;
    this.endColumn = endColumn;
  }

  public Integer getStartLine() {
    return startLine;
  }

  public Integer getStartColumn() {
    return startColumn;
  }

  public Integer getEndLine() {
    return endLine;
  }

  public Integer getEndColumn() {
    return endColumn;
  }

  public static SourceRange.Builder builder() {
    return new SourceRange.Builder();
  }

  public static final class Builder {
    private Integer startLine;

    private Integer startColumn;

    private Integer endLine;

    private Integer endColumn;

    private Builder() {
    }

    public SourceRange.Builder setStartLine(Integer startLine) {
      this.startLine = startLine;
      return this;
    }

    public SourceRange.Builder setStartColumn(Integer startColumn) {
      this.startColumn = startColumn;
      return this;
    }

    public SourceRange.Builder setEndLine(Integer endLine) {
      this.endLine = endLine;
      return this;
    }

    public SourceRange.Builder setEndColumn(Integer endColumn) {
      this.endColumn = endColumn;
      return this;
    }

    public SourceRange build() {
      return new SourceRange(startLine, startColumn, endLine, endColumn);
    }
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy