"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "core/src/main/java/com/google/zxing/oned/rss/expanded/ExpandedRow.java" between
zxing-zxing-3.4.1.tar.gz and zxing-zxing-3.5.0.tar.gz

About: ZXing ("zebra crossing") is a multi-format 1D/2D barcode image processing library implemented in Java, with ports to other languages. Info: Project is in maintenance mode (no active development).

ExpandedRow.java  (zxing-zxing-3.4.1):ExpandedRow.java  (zxing-zxing-3.5.0)
skipping to change at line 29 skipping to change at line 29
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
/** /**
* One row of an RSS Expanded Stacked symbol, consisting of 1+ expanded pairs. * One row of an RSS Expanded Stacked symbol, consisting of 1+ expanded pairs.
*/ */
final class ExpandedRow { final class ExpandedRow {
private final List<ExpandedPair> pairs; private final List<ExpandedPair> pairs;
private final int rowNumber; private final int rowNumber;
/** Did this row of the image have to be reversed (mirrored) to recognize the
pairs? */
private final boolean wasReversed;
ExpandedRow(List<ExpandedPair> pairs, int rowNumber, boolean wasReversed) { ExpandedRow(List<ExpandedPair> pairs, int rowNumber) {
this.pairs = new ArrayList<>(pairs); this.pairs = new ArrayList<>(pairs);
this.rowNumber = rowNumber; this.rowNumber = rowNumber;
this.wasReversed = wasReversed;
} }
List<ExpandedPair> getPairs() { List<ExpandedPair> getPairs() {
return this.pairs; return this.pairs;
} }
int getRowNumber() { int getRowNumber() {
return this.rowNumber; return this.rowNumber;
} }
skipping to change at line 64 skipping to change at line 61
/** /**
* Two rows are equal if they contain the same pairs in the same order. * Two rows are equal if they contain the same pairs in the same order.
*/ */
@Override @Override
public boolean equals(Object o) { public boolean equals(Object o) {
if (!(o instanceof ExpandedRow)) { if (!(o instanceof ExpandedRow)) {
return false; return false;
} }
ExpandedRow that = (ExpandedRow) o; ExpandedRow that = (ExpandedRow) o;
return this.pairs.equals(that.pairs) && wasReversed == that.wasReversed; return this.pairs.equals(that.pairs);
} }
@Override @Override
public int hashCode() { public int hashCode() {
return pairs.hashCode() ^ Boolean.valueOf(wasReversed).hashCode(); return pairs.hashCode();
} }
} }
 End of changes. 5 change blocks. 
7 lines changed or deleted 3 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)