Package limn.backend.spi
Record Class PrintJob
java.lang.Object
java.lang.Record
limn.backend.spi.PrintJob
- Record Components:
title- the job's name, shown in the system's queue and as the dialog's title where a dialog has one; never blankpdf- the document, a complete PDF filepaperWidth- the width of the paper the document was laid out on, in points (1/72 inch), or 0 when it is not known (a PDF the application received)paperHeight- its height in points, or 0 when it is not knownpageCount- how many pages the document has, or -1 when it is not known
public record PrintJob(String title, byte[] pdf, float paperWidth, float paperHeight, int pageCount)
extends Record
What a
PrinterPeer hands the system: a PDF, the job's name, and the paper the document
was laid out on, which the system's dialog starts from.
The bytes are the caller's and are not copied: a peer reads them and does not change them.
-
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.booleanintReturns the value of thepageCountrecord component.floatReturns the value of thepaperHeightrecord component.floatReturns the value of thepaperWidthrecord component.byte[]pdf()Returns the value of thepdfrecord component.title()Returns the value of thetitlerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
PrintJob
Creates an instance of aPrintJobrecord class.- Parameters:
title- the value for thetitlerecord componentpdf- the value for thepdfrecord componentpaperWidth- the value for thepaperWidthrecord componentpaperHeight- the value for thepaperHeightrecord componentpageCount- the value for thepageCountrecord component
-
-
Method Details
-
knowsPaper
public boolean knowsPaper()- Returns:
- whether the paper is known, as it is for a document Limn laid out
-
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 '=='. -
title
Returns the value of thetitlerecord component.- Returns:
- the value of the
titlerecord component
-
pdf
public byte[] pdf()Returns the value of thepdfrecord component.- Returns:
- the value of the
pdfrecord component
-
paperWidth
public float paperWidth()Returns the value of thepaperWidthrecord component.- Returns:
- the value of the
paperWidthrecord component
-
paperHeight
public float paperHeight()Returns the value of thepaperHeightrecord component.- Returns:
- the value of the
paperHeightrecord component
-
pageCount
public int pageCount()Returns the value of thepageCountrecord component.- Returns:
- the value of the
pageCountrecord component
-