Exemplo n.º 1
0
 private static Set<AsciNumber> possibleMatches(String l1, String l2, String l3) {
   final Set<AsciNumber> result = Sets.newHashSet();
   for (AsciNumber asciNumber : AsciNumber.values()) {
     if (errorCount(l1, l2, l3, asciNumber) == 1) {
       result.add(asciNumber);
     }
   }
   return result;
 }
Exemplo n.º 2
0
 public static AsciNumber matching(String l1, String l2, String l3) {
   for (AsciNumber asciNumber : AsciNumber.values()) {
     if (asciNumber.first.equals(l1)
         && asciNumber.second.equals(l2)
         && asciNumber.third.equals(l3)) {
       return asciNumber;
     }
   }
   return ILLEGAL;
 }