com.google.zxing.pdf417.PDF417Common#toIntArray ( )源码实例Demo

下面列出了com.google.zxing.pdf417.PDF417Common#toIntArray ( ) 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。

源代码1 项目: ZXing-Orient   文件: BarcodeValue.java
/**
 * Determines the maximum occurrence of a set value and returns all values which were set with this occurrence. 
 * @return an array of int, containing the values with the highest occurrence, or null, if no value was set
 */
int[] getValue() {
  int maxConfidence = -1;
  Collection<Integer> result = new ArrayList<>();
  for (Entry<Integer,Integer> entry : values.entrySet()) {
    if (entry.getValue() > maxConfidence) {
      maxConfidence = entry.getValue();
      result.clear();
      result.add(entry.getKey());
    } else if (entry.getValue() == maxConfidence) {
      result.add(entry.getKey());
    }
  }
  return PDF417Common.toIntArray(result);
}
 
/**
 * Determines the maximum occurrence of a set value and returns all values which were set with this occurrence. 
 * @return an array of int, containing the values with the highest occurrence, or null, if no value was set
 */
int[] getValue() {
  int maxConfidence = -1;
  Collection<Integer> result = new ArrayList<>();
  for (Entry<Integer,Integer> entry : values.entrySet()) {
    if (entry.getValue() > maxConfidence) {
      maxConfidence = entry.getValue();
      result.clear();
      result.add(entry.getKey());
    } else if (entry.getValue() == maxConfidence) {
      result.add(entry.getKey());
    }
  }
  return PDF417Common.toIntArray(result);
}
 
源代码3 项目: weex   文件: BarcodeValue.java
/**
 * Determines the maximum occurrence of a set value and returns all values which were set with this occurrence. 
 * @return an array of int, containing the values with the highest occurrence, or null, if no value was set
 */
int[] getValue() {
  int maxConfidence = -1;
  Collection<Integer> result = new ArrayList<>();
  for (Entry<Integer,Integer> entry : values.entrySet()) {
    if (entry.getValue() > maxConfidence) {
      maxConfidence = entry.getValue();
      result.clear();
      result.add(entry.getKey());
    } else if (entry.getValue() == maxConfidence) {
      result.add(entry.getKey());
    }
  }
  return PDF417Common.toIntArray(result);
}
 
源代码4 项目: barcodescanner-lib-aar   文件: BarcodeValue.java
/**
 * Determines the maximum occurrence of a set value and returns all values which were set with this occurrence. 
 * @return an array of int, containing the values with the highest occurrence, or null, if no value was set
 */
int[] getValue() {
  int maxConfidence = -1;
  Collection<Integer> result = new ArrayList<>();
  for (Entry<Integer,Integer> entry : values.entrySet()) {
    if (entry.getValue() > maxConfidence) {
      maxConfidence = entry.getValue();
      result.clear();
      result.add(entry.getKey());
    } else if (entry.getValue() == maxConfidence) {
      result.add(entry.getKey());
    }
  }
  return PDF417Common.toIntArray(result);
}