com.hubspot.chrome.devtools.client.core.domsnapshot.LayoutTreeNode 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;
import java.util.List;
/**
* Details of an element in the DOM tree with a LayoutObject.
*/
public final class LayoutTreeNode {
private Integer domNodeIndex;
private Rect boundingBox;
private String layoutText;
private List inlineTextNodes;
private Integer styleIndex;
@JsonCreator
public LayoutTreeNode(@JsonProperty("domNodeIndex") Integer domNodeIndex,
@JsonProperty("boundingBox") Rect boundingBox, @JsonProperty("layoutText") String layoutText,
@JsonProperty("inlineTextNodes") List inlineTextNodes,
@JsonProperty("styleIndex") Integer styleIndex) {
this.domNodeIndex = domNodeIndex;
this.boundingBox = boundingBox;
this.layoutText = layoutText;
this.inlineTextNodes = inlineTextNodes;
this.styleIndex = styleIndex;
}
public Integer getDomNodeIndex() {
return domNodeIndex;
}
public Rect getBoundingBox() {
return boundingBox;
}
public String getLayoutText() {
return layoutText;
}
public List getInlineTextNodes() {
return inlineTextNodes;
}
public Integer getStyleIndex() {
return styleIndex;
}
public static LayoutTreeNode.Builder builder() {
return new LayoutTreeNode.Builder();
}
public static final class Builder {
private Integer domNodeIndex;
private Rect boundingBox;
private String layoutText;
private List inlineTextNodes;
private Integer styleIndex;
private Builder() {
}
public LayoutTreeNode.Builder setDomNodeIndex(Integer domNodeIndex) {
this.domNodeIndex = domNodeIndex;
return this;
}
public LayoutTreeNode.Builder setBoundingBox(Rect boundingBox) {
this.boundingBox = boundingBox;
return this;
}
public LayoutTreeNode.Builder setLayoutText(String layoutText) {
this.layoutText = layoutText;
return this;
}
public LayoutTreeNode.Builder setInlineTextNodes(List inlineTextNodes) {
this.inlineTextNodes = inlineTextNodes;
return this;
}
public LayoutTreeNode.Builder setStyleIndex(Integer styleIndex) {
this.styleIndex = styleIndex;
return this;
}
public LayoutTreeNode build() {
return new LayoutTreeNode(domNodeIndex, boundingBox, layoutText, inlineTextNodes, styleIndex);
}
}
}