X-Git-Url: https://git.argeo.org/?a=blobdiff_plain;f=org.argeo.enterprise%2Fsrc%2Forg%2Fargeo%2Futil%2FDictionaryKeys.java;fp=org.argeo.enterprise%2Fsrc%2Forg%2Fargeo%2Futil%2FDictionaryKeys.java;h=0000000000000000000000000000000000000000;hb=9f729eeb8255a9d800ad2506735dda8cc215a135;hp=d17c86f96889e8b29a21c099d526ce45c523e741;hpb=f9efbe5228615951dd8482a4582aa24e00c10ce5;p=lgpl%2Fargeo-commons.git diff --git a/org.argeo.enterprise/src/org/argeo/util/DictionaryKeys.java b/org.argeo.enterprise/src/org/argeo/util/DictionaryKeys.java deleted file mode 100644 index d17c86f96..000000000 --- a/org.argeo.enterprise/src/org/argeo/util/DictionaryKeys.java +++ /dev/null @@ -1,42 +0,0 @@ -package org.argeo.util; - -import java.util.Dictionary; -import java.util.Enumeration; -import java.util.Iterator; - -/** - * Access the keys of a {@link String}-keyed {@link Dictionary} (common throughout - * the OSGi APIs) as an {@link Iterable} so that they are easily usable in - * for-each loops. - */ -class DictionaryKeys implements Iterable { - private final Dictionary dictionary; - - public DictionaryKeys(Dictionary dictionary) { - this.dictionary = dictionary; - } - - @Override - public Iterator iterator() { - return new KeyIterator(dictionary.keys()); - } - - private static class KeyIterator implements Iterator { - private final Enumeration keys; - - KeyIterator(Enumeration keys) { - this.keys = keys; - } - - @Override - public boolean hasNext() { - return keys.hasMoreElements(); - } - - @Override - public String next() { - return keys.nextElement(); - } - - } -}