Beispiel #1
0
 /**
  * Returns a key similar to the specified string, or {@code null}.
  *
  * @param key key to be found
  * @return similar key
  */
 public final synchronized String similar(final String key) {
   final byte[] name = token(key);
   final Levenshtein ls = new Levenshtein();
   for (final String prop : props.keySet()) {
     if (ls.similar(name, token(prop), 0)) return prop;
   }
   return null;
 }
Beispiel #2
0
 @Override
 public final synchronized Iterator<String> iterator() {
   return props.keySet().iterator();
 }