use of android.icu.dev.util.UnicodeMap in project j2objc by google.
the class UnicodeMapTest method TestAUnicodeMapInverse.
public void TestAUnicodeMapInverse() {
UnicodeMap<Character> foo1 = new UnicodeMap<Character>().putAll('a', 'z', 'b').put("ab", 'c').put('x', 'b').put("xy", 'c');
Map<Character, UnicodeSet> target = new HashMap<Character, UnicodeSet>();
foo1.addInverseTo(target);
UnicodeMap<Character> reverse = new UnicodeMap().putAllInverse(target);
assertEquals("", foo1, reverse);
}
use of android.icu.dev.util.UnicodeMap in project j2objc by google.
the class UnicodeMapTest method TestRemove.
@Test
public void TestRemove() {
UnicodeMap<Double> foo = new UnicodeMap().putAll(0x20, 0x29, -2d).put("abc", 3d).put("xy", 2d).put("mark", 4d).freeze();
UnicodeMap<Double> fii = new UnicodeMap().putAll(0x21, 0x25, -2d).putAll(0x26, 0x28, -3d).put("abc", 3d).put("mark", 999d).freeze();
UnicodeMap<Double> afterFiiRemoval = new UnicodeMap().put(0x20, -2d).putAll(0x26, 0x29, -2d).put("xy", 2d).put("mark", 4d).freeze();
UnicodeMap<Double> afterFiiRetained = new UnicodeMap().putAll(0x21, 0x25, -2d).put("abc", 3d).freeze();
UnicodeMap<Double> test = new UnicodeMap<Double>().putAll(foo).removeAll(fii);
assertEquals("removeAll", afterFiiRemoval, test);
test = new UnicodeMap<Double>().putAll(foo).retainAll(fii);
assertEquals("retainAll", afterFiiRetained, test);
}
use of android.icu.dev.util.UnicodeMap in project j2objc by google.
the class UnicodeMapTest method TestAUnicodeMap2.
public void TestAUnicodeMap2() {
UnicodeMap foo = new UnicodeMap();
@SuppressWarnings("unused") int // make sure doesn't NPE
hash = foo.hashCode();
@SuppressWarnings("unused") Set // make sure doesn't NPE
fii = foo.stringKeys();
}
Aggregations