Record Class PageRegion
java.lang.Object
java.lang.Record
com.vaadin.flow.component.ai.common.PageRegion
- Record Components:
page- the 1-based page number;1when the source has a single surface, such as an imagerect- the area on the page, notnull
- All Implemented Interfaces:
SourceLocation,Serializable
A rectangular area on a page of the source document. The meaning of the
rectangle is fixed — always fractions of the page as the user sees it — but
its accuracy is the model's: the rectangle is never checked against the
document, so it points a reviewer at an area rather than measuring one.
- Since:
- 25.3
- Author:
- Vaadin Ltd
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intpage()Returns the value of thepagerecord component.rect()Returns the value of therectrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
PageRegion
Creates a new page region.- Parameters:
page- the 1-based page numberrect- the area on the page, notnull- Throws:
NullPointerException- ifrectisnullIllegalArgumentException- ifpageis less than1
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
page
public int page()Returns the value of thepagerecord component.- Returns:
- the value of the
pagerecord component
-
rect
Returns the value of therectrecord component.- Returns:
- the value of the
rectrecord component
-