Added/updated/deleted some comments.

pull/134/head
Project Nayuki 6 years ago
parent df729db98b
commit 8551314425

@ -197,6 +197,8 @@ public final class QrCode {
/*---- Instance fields ----*/
// Public immutable scalar parameters:
/** The version number of this QR Code, which is between 1 and 40 (inclusive).
* This determines the size of this barcode. */
public final int version;
@ -213,6 +215,8 @@ public final class QrCode {
* −1), the resulting object still has a mask value between 0 and 7. */
public final int mask;
// Private grid of modules/pixels:
// The modules of this QR Code. Immutable after constructor finishes. Accessed through getModule().
private final int[] modules;

@ -40,7 +40,8 @@ import java.util.Objects;
* <p>This segment class imposes no length restrictions, but QR Codes have restrictions.
* Even in the most favorable conditions, a QR Code can only hold 7089 characters of data.
* Any segment longer than this is meaningless for the purpose of generating QR Codes.
* This class can represent kanji mode segments, but provides no help in encoding them.</p>
* This class can represent kanji mode segments, but provides no help in encoding them
* - see {@link QrSegmentAdvanced} for full kanji support.</p>
*/
public final class QrSegment {
@ -224,7 +225,7 @@ public final class QrSegment {
* Always zero or positive. Not the same as the data's bit length. */
public final int numChars;
// The data bits of this segment. Not null. Accessed through getData().
// The data bits of this segment. Not null.
final int[] data;
// Requires 0 <= bitLength <= data.length * 32.
@ -273,7 +274,6 @@ public final class QrSegment {
}
/*---- Constants ----*/
static final int[] ALPHANUMERIC_MAP;

@ -90,7 +90,8 @@ final class QrTemplate {
final int[][] masks;
final int[] dataOutputBitIndexes;
private int[] isFunction; // Discarded when constructor finishes
// Indicates function modules that are not subjected to masking. Discarded when constructor finishes.
private int[] isFunction;
private QrTemplate(int ver) {
@ -275,8 +276,6 @@ final class QrTemplate {
}
/*---- Private static helper functions ----*/
// Returns an ascending list of positions of alignment patterns for this version number.
// Each position is in the range [0,177), and are used on both the x and y axes.
// This could be implemented as lookup table of 40 variable-length lists of unsigned bytes.

Loading…
Cancel
Save