本文整理汇总了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;
}
示例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();
}
示例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();
}
示例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();
}
示例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();
}
示例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();
}
示例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();
}