示例#1
0
 public synchronized DFA get() {
   if (dfa123 == this) {
     Set<String> nameSet = new HashSet<String>();
     for (Map.Entry<Long, List<CityToken>> e : DataCache.pIdMap.entrySet()) {
       for (CityToken ct : e.getValue()) {
         if (ct.getLevel() <= 3) {
           nameSet.add(ct.getName());
         } else {
           break;
         }
       }
     }
     final DFA dfa = DFA.create(NodeCreater.create(nameSet));
     dfa123 =
         new DFASupplier() {
           public DFA get() {
             return dfa;
           }
         };
     return dfa;
   }
   return dfa123.get();
 }
示例#2
0
 public static DFA getDFA123() {
   return dfa123.get();
 }