当前位置: 首页>>代码示例>>Java>>正文


Java DataCharacter.getValue方法代码示例

本文整理汇总了Java中com.google.zxing.oned.rss.DataCharacter.getValue方法的典型用法代码示例。如果您正苦于以下问题:Java DataCharacter.getValue方法的具体用法?Java DataCharacter.getValue怎么用?Java DataCharacter.getValue使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.google.zxing.oned.rss.DataCharacter的用法示例。


在下文中一共展示了DataCharacter.getValue方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: checkChecksum

import com.google.zxing.oned.rss.DataCharacter; //导入方法依赖的package包/类
private boolean checkChecksum() {
    ExpandedPair firstPair = (ExpandedPair) this.pairs.get(0);
    DataCharacter checkCharacter = firstPair.getLeftChar();
    DataCharacter firstCharacter = firstPair.getRightChar();
    if (firstCharacter == null) {
        return false;
    }
    int checksum = firstCharacter.getChecksumPortion();
    int s = 2;
    for (int i = 1; i < this.pairs.size(); i++) {
        ExpandedPair currentPair = (ExpandedPair) this.pairs.get(i);
        checksum += currentPair.getLeftChar().getChecksumPortion();
        s++;
        DataCharacter currentRightChar = currentPair.getRightChar();
        if (currentRightChar != null) {
            checksum += currentRightChar.getChecksumPortion();
            s++;
        }
    }
    if (((s - 4) * Opcodes.DIV_INT_LIT16) + (checksum % Opcodes.DIV_INT_LIT16) ==
            checkCharacter.getValue()) {
        return true;
    }
    return false;
}
 
开发者ID:JackChan1999,项目名称:boohee_v5.6,代码行数:26,代码来源:RSSExpandedReader.java

示例2: checkChecksum

import com.google.zxing.oned.rss.DataCharacter; //导入方法依赖的package包/类
private boolean checkChecksum() {
  ExpandedPair firstPair = this.pairs.get(0);
  DataCharacter checkCharacter = firstPair.getLeftChar();
  DataCharacter firstCharacter = firstPair.getRightChar();

  int checksum = firstCharacter.getChecksumPortion();
  int s = 2;

  for(int i = 1; i < this.pairs.size(); ++i){
    ExpandedPair currentPair = this.pairs.get(i);
    checksum += currentPair.getLeftChar().getChecksumPortion();
    s++;
    DataCharacter currentRightChar = currentPair.getRightChar();
    if (currentRightChar != null) {
      checksum += currentRightChar.getChecksumPortion();
      s++;
    }
  }

  checksum %= 211;

  int checkCharacterValue = 211 * (s - 4) + checksum;

  return checkCharacterValue == checkCharacter.getValue();
}
 
开发者ID:atomsheep,项目名称:sres-app,代码行数:26,代码来源:RSSExpandedReader.java

示例3: a

import com.google.zxing.oned.rss.DataCharacter; //导入方法依赖的package包/类
private boolean a()
{
    b b1 = (b)o.get(0);
    DataCharacter datacharacter = b1.b();
    int i1 = b1.c().getChecksumPortion();
    int j1 = 2;
    int k1 = i1;
    for (int l1 = 1; l1 < o.size(); l1++)
    {
        b b2 = (b)o.get(l1);
        k1 += b2.b().getChecksumPortion();
        j1++;
        DataCharacter datacharacter1 = b2.c();
        if (datacharacter1 != null)
        {
            k1 += datacharacter1.getChecksumPortion();
            j1++;
        }
    }

    return k1 % 211 + 211 * (j1 - 4) == datacharacter.getValue();
}
 
开发者ID:vishnudevk,项目名称:MiBandDecompiled,代码行数:23,代码来源:RSSExpandedReader.java

示例4: checkChecksum

import com.google.zxing.oned.rss.DataCharacter; //导入方法依赖的package包/类
private boolean checkChecksum(){
  ExpandedPair firstPair = (ExpandedPair)this.pairs.elementAt(0);
  DataCharacter checkCharacter = firstPair.getLeftChar();
  DataCharacter firstCharacter = firstPair.getRightChar();

  int checksum = firstCharacter.getChecksumPortion();
  int S = 2;

  for(int i = 1; i < this.pairs.size(); ++i){
    ExpandedPair currentPair = (ExpandedPair)this.pairs.elementAt(i);
    checksum += currentPair.getLeftChar().getChecksumPortion();
    S++;
    if(currentPair.getRightChar() != null){
      checksum += currentPair.getRightChar().getChecksumPortion();
      S++;
    }
  }

  checksum %= 211;

  int checkCharacterValue = 211 * (S - 4) + checksum;

  return checkCharacterValue == checkCharacter.getValue();
}
 
开发者ID:saqimtiaz,项目名称:BibSearch,代码行数:25,代码来源:RSSExpandedReader.java

示例5: checkChecksum

import com.google.zxing.oned.rss.DataCharacter; //导入方法依赖的package包/类
private boolean checkChecksum() {
  ExpandedPair firstPair = this.pairs.get(0);
  DataCharacter checkCharacter = firstPair.getLeftChar();
  DataCharacter firstCharacter = firstPair.getRightChar();

  if (firstCharacter == null) {
    return false;
  }

  int checksum = firstCharacter.getChecksumPortion();
  int s = 2;

  for(int i = 1; i < this.pairs.size(); ++i){
    ExpandedPair currentPair = this.pairs.get(i);
    checksum += currentPair.getLeftChar().getChecksumPortion();
    s++;
    DataCharacter currentRightChar = currentPair.getRightChar();
    if (currentRightChar != null) {
      checksum += currentRightChar.getChecksumPortion();
      s++;
    }
  }

  checksum %= 211;

  int checkCharacterValue = 211 * (s - 4) + checksum;

  return checkCharacterValue == checkCharacter.getValue();
}
 
开发者ID:amap-demo,项目名称:weex-3d-map,代码行数:30,代码来源:RSSExpandedReader.java

示例6: checkChecksum

import com.google.zxing.oned.rss.DataCharacter; //导入方法依赖的package包/类
private boolean checkChecksum() {
  ExpandedPair firstPair = this.pairs.get(0);
  DataCharacter checkCharacter = firstPair.getLeftChar();
  DataCharacter firstCharacter = firstPair.getRightChar();

  if (firstCharacter == null) {
    return false;
  }

  int checksum = firstCharacter.getChecksumPortion();
  int s = 2;

  for (int i = 1; i < this.pairs.size(); ++i) {
    ExpandedPair currentPair = this.pairs.get(i);
    checksum += currentPair.getLeftChar().getChecksumPortion();
    s++;
    DataCharacter currentRightChar = currentPair.getRightChar();
    if (currentRightChar != null) {
      checksum += currentRightChar.getChecksumPortion();
      s++;
    }
  }

  checksum %= 211;

  int checkCharacterValue = 211 * (s - 4) + checksum;

  return checkCharacterValue == checkCharacter.getValue();
}
 
开发者ID:10045125,项目名称:QrCode,代码行数:30,代码来源:RSSExpandedReader.java

示例7: checkChecksum

import com.google.zxing.oned.rss.DataCharacter; //导入方法依赖的package包/类
private boolean checkChecksum() {
    ExpandedPair firstPair = this.pairs.get(0);
    DataCharacter checkCharacter = firstPair.getLeftChar();
    DataCharacter firstCharacter = firstPair.getRightChar();

    if (firstCharacter == null) {
        return false;
    }

    int checksum = firstCharacter.getChecksumPortion();
    int s = 2;

    for (int i = 1; i < this.pairs.size(); ++i) {
        ExpandedPair currentPair = this.pairs.get(i);
        checksum += currentPair.getLeftChar().getChecksumPortion();
        s++;
        DataCharacter currentRightChar = currentPair.getRightChar();
        if (currentRightChar != null) {
            checksum += currentRightChar.getChecksumPortion();
            s++;
        }
    }

    checksum %= 211;

    int checkCharacterValue = 211 * (s - 4) + checksum;

    return checkCharacterValue == checkCharacter.getValue();
}
 
开发者ID:Ag47,项目名称:TrueTone,代码行数:30,代码来源:RSSExpandedReader.java


注:本文中的com.google.zxing.oned.rss.DataCharacter.getValue方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。