Record Class ScaleFactor

java.lang.Object
java.lang.Record
org.xhtmlrenderer.demo.browser.ScaleFactor

public record ScaleFactor(double factor, String zoomLabel) extends Record
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private final double
    The field for the factor record component.
    static final double
     
    static final double
     
    static final double
     
    private final String
    The field for the zoomLabel record component.
  • Constructor Summary

    Constructors
    Constructor
    Description
    ScaleFactor(double factor, String zoomLabel)
    Creates an instance of a ScaleFactor record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    final boolean
    Indicates whether some other object is "equal to" this one.
    double
    Returns the value of the factor record component.
    final int
    Returns a hash code value for this object.
    boolean
     
    Returns a string representation of this record class.
    Returns the value of the zoomLabel record component.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Details

    • factor

      private final double factor
      The field for the factor record component.
    • zoomLabel

      private final String zoomLabel
      The field for the zoomLabel 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

      public ScaleFactor(double factor, String zoomLabel)
      Creates an instance of a ScaleFactor record class.
      Parameters:
      factor - the value for the factor record component
      zoomLabel - the value for the zoomLabel record component
  • Method Details

    • toString

      public String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • factor

      public double factor()
      Returns the value of the factor record component.
      Returns:
      the value of the factor record component
    • zoomLabel

      public String zoomLabel()
      Returns the value of the zoomLabel record component.
      Returns:
      the value of the zoomLabel record component