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

com.hubspot.chrome.devtools.client.core.browser.Bounds Maven / Gradle / Ivy

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

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

/**
 * Browser window bounds information
 */
public final class Bounds {
  private Integer left;

  private Integer top;

  private Integer width;

  private Integer height;

  private WindowState windowState;

  @JsonCreator
  public Bounds(@JsonProperty("left") Integer left, @JsonProperty("top") Integer top,
      @JsonProperty("width") Integer width, @JsonProperty("height") Integer height,
      @JsonProperty("windowState") WindowState windowState) {
    this.left = left;
    this.top = top;
    this.width = width;
    this.height = height;
    this.windowState = windowState;
  }

  public Integer getLeft() {
    return left;
  }

  public Integer getTop() {
    return top;
  }

  public Integer getWidth() {
    return width;
  }

  public Integer getHeight() {
    return height;
  }

  public WindowState getWindowState() {
    return windowState;
  }

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

  public static final class Builder {
    private Integer left;

    private Integer top;

    private Integer width;

    private Integer height;

    private WindowState windowState;

    private Builder() {
    }

    public Bounds.Builder setLeft(Integer left) {
      this.left = left;
      return this;
    }

    public Bounds.Builder setTop(Integer top) {
      this.top = top;
      return this;
    }

    public Bounds.Builder setWidth(Integer width) {
      this.width = width;
      return this;
    }

    public Bounds.Builder setHeight(Integer height) {
      this.height = height;
      return this;
    }

    public Bounds.Builder setWindowState(WindowState windowState) {
      this.windowState = windowState;
      return this;
    }

    public Bounds build() {
      return new Bounds(left, top, width, height, windowState);
    }
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy