com.hubspot.chrome.devtools.client.core.dom.Rect Maven / Gradle / Ivy
package com.hubspot.chrome.devtools.client.core.dom;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
/**
* Rectangle.
*/
public final class Rect {
private Number x;
private Number y;
private Number width;
private Number height;
@JsonCreator
public Rect(@JsonProperty("x") Number x, @JsonProperty("y") Number y,
@JsonProperty("width") Number width, @JsonProperty("height") Number height) {
this.x = x;
this.y = y;
this.width = width;
this.height = height;
}
public Number getX() {
return x;
}
public Number getY() {
return y;
}
public Number getWidth() {
return width;
}
public Number getHeight() {
return height;
}
public static Rect.Builder builder() {
return new Rect.Builder();
}
public static final class Builder {
private Number x;
private Number y;
private Number width;
private Number height;
private Builder() {
}
public Rect.Builder setX(Number x) {
this.x = x;
return this;
}
public Rect.Builder setY(Number y) {
this.y = y;
return this;
}
public Rect.Builder setWidth(Number width) {
this.width = width;
return this;
}
public Rect.Builder setHeight(Number height) {
this.height = height;
return this;
}
public Rect build() {
return new Rect(x, y, width, height);
}
}
}