ICU-4700 additions for CLDRFile
X-SVN-Rev: 18739
This commit is contained in:
parent
5796eb1aca
commit
40d9cff7f6
@ -21,6 +21,9 @@ import com.ibm.icu.text.UTF16;
|
||||
import com.ibm.icu.text.UnicodeSet;
|
||||
import com.ibm.icu.text.UnicodeSetIterator;
|
||||
|
||||
/**
|
||||
* Utilities that ought to be on collections, but aren't
|
||||
*/
|
||||
public final class CollectionUtilities {
|
||||
/**
|
||||
* Utility like Arrays.asList()
|
||||
@ -36,6 +39,13 @@ public final class CollectionUtilities {
|
||||
return target;
|
||||
}
|
||||
|
||||
public static Collection addAll(Collection target, Iterator source) {
|
||||
while (source.hasNext()) {
|
||||
target.add(source.next());
|
||||
}
|
||||
return target; // for chaining
|
||||
}
|
||||
|
||||
public static Map asMap(Object[][] source) {
|
||||
return asMap(source, new HashMap(), false);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user