com.hubspot.chrome.devtools.client.core.domsnapshot.InlineTextBox Maven / Gradle / Ivy
package com.hubspot.chrome.devtools.client.core.domsnapshot;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.hubspot.chrome.devtools.client.core.dom.Rect;
/**
* Details of post layout rendered text positions. The exact layout should not be regarded as
* stable and may change between versions.
*/
public final class InlineTextBox {
private Rect boundingBox;
private Integer startCharacterIndex;
private Integer numCharacters;
@JsonCreator
public InlineTextBox(@JsonProperty("boundingBox") Rect boundingBox,
@JsonProperty("startCharacterIndex") Integer startCharacterIndex,
@JsonProperty("numCharacters") Integer numCharacters) {
this.boundingBox = boundingBox;
this.startCharacterIndex = startCharacterIndex;
this.numCharacters = numCharacters;
}
public Rect getBoundingBox() {
return boundingBox;
}
public Integer getStartCharacterIndex() {
return startCharacterIndex;
}
public Integer getNumCharacters() {
return numCharacters;
}
public static InlineTextBox.Builder builder() {
return new InlineTextBox.Builder();
}
public static final class Builder {
private Rect boundingBox;
private Integer startCharacterIndex;
private Integer numCharacters;
private Builder() {
}
public InlineTextBox.Builder setBoundingBox(Rect boundingBox) {
this.boundingBox = boundingBox;
return this;
}
public InlineTextBox.Builder setStartCharacterIndex(Integer startCharacterIndex) {
this.startCharacterIndex = startCharacterIndex;
return this;
}
public InlineTextBox.Builder setNumCharacters(Integer numCharacters) {
this.numCharacters = numCharacters;
return this;
}
public InlineTextBox build() {
return new InlineTextBox(boundingBox, startCharacterIndex, numCharacters);
}
}
}