本文整理汇总了Java中com.google.zxing.oned.rss.FinderPattern.getValue方法的典型用法代码示例。如果您正苦于以下问题:Java FinderPattern.getValue方法的具体用法?Java FinderPattern.getValue怎么用?Java FinderPattern.getValue使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.google.zxing.oned.rss.FinderPattern
的用法示例。
在下文中一共展示了FinderPattern.getValue方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: checkPairSequence
import com.google.zxing.oned.rss.FinderPattern; //导入方法依赖的package包/类
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();
}
示例2: checkPairSequence
import com.google.zxing.oned.rss.FinderPattern; //导入方法依赖的package包/类
private boolean checkPairSequence(Vector 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] = ((ExpandedPair) previousPairs.elementAt(pos)).getFinderPattern().getValue();
}
this.currentSequence[currentSequenceLength - 1] = pattern.getValue();
for(int i = 0; i < FINDER_PATTERN_SEQUENCES.length; ++i){
int [] validSequence = FINDER_PATTERN_SEQUENCES[i];
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();
}
示例3: isNotA1left
import com.google.zxing.oned.rss.FinderPattern; //导入方法依赖的package包/类
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);
}
示例4: isNotA1left
import com.google.zxing.oned.rss.FinderPattern; //导入方法依赖的package包/类
private static boolean isNotA1left(FinderPattern pattern, boolean isOddPattern, boolean
leftChar) {
return (pattern.getValue() == 0 && isOddPattern && leftChar) ? false : true;
}
示例5: isNotA1left
import com.google.zxing.oned.rss.FinderPattern; //导入方法依赖的package包/类
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);
}
示例6: a
import com.google.zxing.oned.rss.FinderPattern; //导入方法依赖的package包/类
private static boolean a(FinderPattern finderpattern, boolean flag, boolean flag1)
{
return finderpattern.getValue() != 0 || !flag || !flag1;
}