Package org.xhtmlrenderer.demo.browser
Record Class ScaleFactor
java.lang.Object
java.lang.Record
org.xhtmlrenderer.demo.browser.ScaleFactor
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final double
The field for thefactor
record component.static final double
static final double
static final double
private final String
The field for thezoomLabel
record component. -
Constructor Summary
ConstructorsConstructorDescriptionScaleFactor
(double factor, String zoomLabel) Creates an instance of aScaleFactor
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.double
factor()
Returns the value of thefactor
record component.final int
hashCode()
Returns a hash code value for this object.boolean
toString()
Returns a string representation of this record class.Returns the value of thezoomLabel
record component.
-
Field Details
-
factor
private final double factorThe field for thefactor
record component. -
zoomLabel
The field for thezoomLabel
record component. -
PAGE_WIDTH
public static final double PAGE_WIDTH- See Also:
-
PAGE_HEIGHT
public static final double PAGE_HEIGHT- See Also:
-
PAGE_WHOLE
public static final double PAGE_WHOLE- See Also:
-
-
Constructor Details
-
ScaleFactor
Creates an instance of aScaleFactor
record class.- Parameters:
factor
- the value for thefactor
record componentzoomLabel
- the value for thezoomLabel
record component
-
-
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. -
isNotZoomed
public boolean isNotZoomed() -
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 '=='. -
factor
public double factor()Returns the value of thefactor
record component.- Returns:
- the value of the
factor
record component
-
zoomLabel
Returns the value of thezoomLabel
record component.- Returns:
- the value of the
zoomLabel
record component
-