java.lang.Object
de.vwsoft.barcodelib4j.twod.PDF417Size
Immutable representation of a PDF417 symbol size.
PDF417 symbols are defined by their column count (1-30) and row count (3-90). The special value
0 can be used for either dimension to indicate automatic sizing based on the data to be
encoded.
Examples:
// Fixed size: 10 columns, 20 rows PDF417Size fixed = new PDF417Size(10, 20); // Auto columns, fixed 20 rows PDF417Size autoCols = new PDF417Size(0, 20); // Fully automatic sizing PDF417Size auto = new PDF417Size(0, 0);
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal intThe number of columns, or0for automatic sizing.static final intMaximum number of columns (code words) in a valid PDF417 symbol; value: 30.static final intMinimum number of columns (code words) in a valid PDF417 symbol; value: 1.final intThe number of rows, or0for automatic sizing.static final intMaximum number of rows in a valid PDF417 symbol; value: 90.static final intMinimum number of rows in a valid PDF417 symbol; value: 3. -
Constructor Summary
ConstructorsConstructorDescriptionPDF417Size(int cols, int rows) Creates a new instance with the specified column and row counts. -
Method Summary
-
Field Details
-
ROWS_MIN
public static final int ROWS_MINMinimum number of rows in a valid PDF417 symbol; value: 3. -
ROWS_MAX
public static final int ROWS_MAXMaximum number of rows in a valid PDF417 symbol; value: 90. -
COLS_MIN
public static final int COLS_MINMinimum number of columns (code words) in a valid PDF417 symbol; value: 1. -
COLS_MAX
public static final int COLS_MAXMaximum number of columns (code words) in a valid PDF417 symbol; value: 30. -
cols
public final int colsThe number of columns, or0for automatic sizing. -
rows
public final int rowsThe number of rows, or0for automatic sizing.
-
-
Constructor Details
-
PDF417Size
public PDF417Size(int cols, int rows) Creates a new instance with the specified column and row counts.Use
0for either dimension to enable automatic sizing for that dimension.- Parameters:
cols- the number of columns (1-30, or 0 for auto)rows- the number of rows (3-90, or 0 for auto)- Throws:
IllegalArgumentException- if column count or row count is outside the respective valid range
-
-
Method Details
-
equals
Returnstrueif this size equals the specified object.Two
PDF417Sizeobjects are equal if they have the same column and row counts. -
hashCode
public int hashCode()Returns the hash code calculated from the columns and rows values. -
toString
Returns a string representation of this instance.This method is intended to be used only for debugging purposes.
-