Java Code Examples for com.google.zxing.oned.rss.FinderPattern#getValue()

The following examples show how to use com.google.zxing.oned.rss.FinderPattern#getValue() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: RSSExpandedReader.java    From reacteu-app with MIT License 5 votes vote down vote up
private boolean checkPairSequence(List<ExpandedPair> previousPairs, FinderPattern pattern)
    throws NotFoundException {
  int currentSequenceLength = previousPairs.size() + 1;
  if(currentSequenceLength > this.currentSequence.length) {
    throw NotFoundException.getNotFoundInstance();
  }

  for(int pos = 0; pos < previousPairs.size(); ++pos) {
    this.currentSequence[pos] = previousPairs.get(pos).getFinderPattern().getValue();
  }

  this.currentSequence[currentSequenceLength - 1] = pattern.getValue();

  for (int[] validSequence : FINDER_PATTERN_SEQUENCES) {
    if (validSequence.length >= currentSequenceLength) {
      boolean valid = true;
      for (int pos = 0; pos < currentSequenceLength; ++pos) {
        if (this.currentSequence[pos] != validSequence[pos]) {
          valid = false;
          break;
        }
      }

      if (valid) {
        return currentSequenceLength == validSequence.length;
      }
    }
  }

  throw NotFoundException.getNotFoundInstance();
}
 
Example 2
Source File: RSSExpandedReader.java    From ScreenCapture with MIT License 4 votes vote down vote up
private static boolean isNotA1left(FinderPattern pattern, boolean isOddPattern, boolean leftChar) {
  // A1: pattern.getValue is 0 (A), and it's an oddPattern, and it is a left char
  return !(pattern.getValue() == 0 && isOddPattern && leftChar);
}
 
Example 3
Source File: RSSExpandedReader.java    From Tesseract-OCR-Scanner with Apache License 2.0 4 votes vote down vote up
private static boolean isNotA1left(FinderPattern pattern, boolean isOddPattern, boolean leftChar) {
  // A1: pattern.getValue is 0 (A), and it's an oddPattern, and it is a left char
  return !(pattern.getValue() == 0 && isOddPattern && leftChar);
}
 
Example 4
Source File: RSSExpandedReader.java    From QrCodeScanner with GNU General Public License v3.0 4 votes vote down vote up
private static boolean isNotA1left(FinderPattern pattern, boolean isOddPattern, boolean leftChar) {
  // A1: pattern.getValue is 0 (A), and it's an oddPattern, and it is a left char
  return !(pattern.getValue() == 0 && isOddPattern && leftChar);
}
 
Example 5
Source File: RSSExpandedReader.java    From ZXing-Orient with Apache License 2.0 4 votes vote down vote up
private static boolean isNotA1left(FinderPattern pattern, boolean isOddPattern, boolean leftChar) {
  // A1: pattern.getValue is 0 (A), and it's an oddPattern, and it is a left char
  return !(pattern.getValue() == 0 && isOddPattern && leftChar);
}
 
Example 6
Source File: RSSExpandedReader.java    From analyzer-of-android-for-Apache-Weex with Apache License 2.0 4 votes vote down vote up
private static boolean isNotA1left(FinderPattern pattern, boolean isOddPattern, boolean leftChar) {
  // A1: pattern.getValue is 0 (A), and it's an oddPattern, and it is a left char
  return !(pattern.getValue() == 0 && isOddPattern && leftChar);
}
 
Example 7
Source File: RSSExpandedReader.java    From weex with Apache License 2.0 4 votes vote down vote up
private static boolean isNotA1left(FinderPattern pattern, boolean isOddPattern, boolean leftChar) {
  // A1: pattern.getValue is 0 (A), and it's an oddPattern, and it is a left char
  return !(pattern.getValue() == 0 && isOddPattern && leftChar);
}
 
Example 8
Source File: RSSExpandedReader.java    From barcodescanner-lib-aar with MIT License 4 votes vote down vote up
private static boolean isNotA1left(FinderPattern pattern, boolean isOddPattern, boolean leftChar) {
  // A1: pattern.getValue is 0 (A), and it's an oddPattern, and it is a left char
  return !(pattern.getValue() == 0 && isOddPattern && leftChar);
}
 
Example 9
Source File: RSSExpandedReader.java    From reacteu-app with MIT License 4 votes vote down vote up
private static boolean isNotA1left(FinderPattern pattern, boolean isOddPattern, boolean leftChar) {
  // A1: pattern.getValue is 0 (A), and it's an oddPattern, and it is a left char
  return !(pattern.getValue() == 0 && isOddPattern && leftChar);
}
 
Example 10
Source File: RSSExpandedReader.java    From MiBandDecompiled with Apache License 2.0 4 votes vote down vote up
private static boolean a(FinderPattern finderpattern, boolean flag, boolean flag1)
{
    return finderpattern.getValue() != 0 || !flag || !flag1;
}