/libcore/luni/src/test/java/libcore/java/util/ |
H A D | CollectionsTest.java | 318 NavigableMap<String, Integer> map = checkedNavigableMap( 321 map.replaceAll((k, v) -> 5 * v); 324 map); 328 NavigableMap<Integer, Double> map = 330 MapDefaultMethodTester.test_putIfAbsent(map, 335 NavigableMap<Integer, Double> map = 337 MapDefaultMethodTester.test_remove(map, 342 NavigableMap<Integer, Double> map = 344 MapDefaultMethodTester.test_replace$K$V$V(map, 349 NavigableMap<Integer, Double> map 807 check_unmodifiableNavigableMap_defaultMethods(NavigableMap<K,V> map, List<K> keysInOrder, List<V> valuesInOrder, K absentKey, V absentValue) argument 922 check_unmodifiableOrderedMap_defaultMethods(Map<K,V> map, List<K> keysInOrder, List<V> valuesInOrder, K absentKey, V absentValue) argument 975 check_unmodifiableNavigableMap_collectionViews( NavigableMap<K, V> map, List<K> keysInOrder, List<V> valuesInOrder, K absentKey) argument 1014 check_navigableMap_isChecked(NavigableMap map, K presentKey, V presentValue, K absentKeyHead, K absentKeyTail, V absentValue) argument 1035 check_map_isChecked(Map map, K presentKey, V presentValue, K absentKey, V absentValue) argument [all...] |
H A D | LocaleLanguageRangeTest.java | 181 Map<String, List<String>> map = new HashMap<>(); 182 map.put("zh", Collections.unmodifiableList(Arrays.asList("zh", "zh-Hans"))); 183 map.put("zh-HK", Collections.singletonList("zh-HK")); 184 map.put("zh-TW", Collections.singletonList("zh-TW")); 203 .mapEquivalents(inputPriorityList, map); 217 * null map, but the current behavior is the same as for an empty map. This test 235 Map<String, List<String>> map = new HashMap<>(); 236 map.put("fr", Arrays.asList("de-DE")); 237 map [all...] |
H A D | HashMapTest.java | 152 // For the empty map, the estimates are exact 227 HashMap<String, String> map = new HashMap<>(); 228 map.put("one", "1"); 229 map.put("two", "2"); 230 map.put("three", "3"); 232 map.replaceAll((k, v) -> k + v); 233 assertEquals("one1", map.get("one")); 234 assertEquals("two2", map.get("two")); 235 assertEquals("three3", map.get("three")); 236 assertEquals(3, map [all...] |
/libcore/ojluni/src/test/java/time/tck/java/time/format/ |
H A D | TCKDateTimeTextPrinting.java | 161 Map<Long, String> map = new HashMap<Long, String>(); 162 map.put(1L, "JNY"); 163 map.put(2L, "FBY"); 164 map.put(3L, "MCH"); 165 map.put(4L, "APL"); 166 map.put(5L, "MAY"); 167 map.put(6L, "JUN"); 168 map.put(7L, "JLY"); 169 map.put(8L, "AGT"); 170 map [all...] |
/libcore/ojluni/src/main/java/java/io/ |
H A D | ExpiringCache.java | 38 private Map<String,Entry> map; field in class:ExpiringCache 67 map = new LinkedHashMap<String,Entry>() { 99 map.put(key, new Entry(System.currentTimeMillis(), val)); 104 map.clear(); 108 Entry entry = map.get(key); 112 map.remove(key); 120 Set<String> keySet = map.keySet();
|
/libcore/ojluni/src/test/java/util/stream/test/org/openjdk/tests/java/util/ |
H A D | MapTest.java | 48 private Map<Integer, String> map; field in class:MapTest 71 map = new HashMap<>(EXPECTED); 76 map.clear(); 77 map = null; 83 map.forEach((k, v) -> {values.add(v);}); 89 map.replaceAll((k, v) -> {return v.toUpperCase();}); 90 for (final Map.Entry<Integer, String> entry : map.entrySet()) {
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/ |
H A D | HashMapTest.java | 182 // Check clear on a large loaded map of Integer keys 183 HashMap<Integer, String> map = new HashMap<Integer, String>(); 185 map.put(i, "foobar"); 187 map.clear(); 188 assertEquals("Failed to reset size on large integer map", 0, hm.size()); 190 assertNull("Failed to clear integer map values", map.get(i)); 205 HashMap map = new HashMap(); 206 map.put("key", "value"); 208 Set keys = map [all...] |
H A D | TreeMapRndTest.java | 26 map = new TreeMap<Integer, Integer>(ref);
|
H A D | WeakHashMapTest.java | 124 WeakHashMap map = new WeakHashMap(mockMap); 125 assertEquals("Size should be 0", 0, map.size()); 144 assertTrue("Cleared map should be empty", whm.isEmpty()); 146 assertNull("Cleared map should only return null", whm.get(keyArray[i])); 194 assertTrue("Invalid map entry returned--bad key", keys.contains(entry.getKey())); 195 assertTrue("Invalid map entry returned--bad key", values.contains(entry.getValue())); 223 assertTrue("New map should be empty", whm.isEmpty()); 237 WeakHashMap map = new WeakHashMap(); 238 map.put(null, "value"); // add null key 242 map [all...] |
/libcore/ojluni/src/main/java/java/beans/ |
H A D | PropertyChangeSupport.java | 82 private PropertyChangeListenerMap map = new PropertyChangeListenerMap(); field in class:PropertyChangeSupport 117 this.map.add(null, listener); 143 this.map.remove(null, listener); 179 return this.map.getListeners(); 201 listener = this.map.extract(listener); 203 this.map.add(propertyName, listener); 226 listener = this.map.extract(listener); 228 this.map.remove(propertyName, listener); 244 return this.map.getListeners(propertyName); 322 PropertyChangeListener[] common = this.map [all...] |
/libcore/ojluni/src/main/java/sun/security/x509/ |
H A D | CertificateExtensions.java | 60 private Map<String,Extension> map = Collections.synchronizedMap( field in class:CertificateExtensions 102 if (map.put(ext.getExtensionId().toString(), ext) == null) { 114 if (map.put(certExt.getName(), (Extension)certExt) != null) { 170 Collection<Extension> allExts = map.values(); 204 map.put(name, (Extension)obj); 216 Extension obj = map.get(name); 226 return map.get(name); 235 Object obj = map.get(name); 239 map.remove(name); 243 for (String name: map [all...] |
H A D | PolicyMappingsExtension.java | 64 public static final String MAP = "map"; 78 for (CertificatePolicyMap map : maps) { 79 map.encode(tmp); 91 public PolicyMappingsExtension(List<CertificatePolicyMap> map) argument 93 this.maps = map; 130 CertificatePolicyMap map = new CertificatePolicyMap(seq); 131 maps.add(map); 136 * Returns a printable representation of the policy map.
|
H A D | CRLExtensions.java | 66 private Map<String,Extension> map = Collections.synchronizedMap( field in class:CRLExtensions 118 if (map.put(ext.getExtensionId().toString(), ext) != null) 126 if (map.put(crlExt.getName(), (Extension)crlExt) != null) { 148 Collection<Extension> allExts = map.values(); 192 return map.get(name); 203 map.put(alias, (Extension)obj); 212 map.remove(alias); 220 return Collections.enumeration(map.values()); 228 return map.values(); 259 if (len != map [all...] |
H A D | ExtendedKeyUsageExtension.java | 99 private static final Map <ObjectIdentifier, String> map = field in class:ExtendedKeyUsageExtension 114 map.put(ObjectIdentifier.newInternal(anyExtendedKeyUsageOidData), "anyExtendedKeyUsage"); 115 map.put(ObjectIdentifier.newInternal(serverAuthOidData), "serverAuth"); 116 map.put(ObjectIdentifier.newInternal(clientAuthOidData), "clientAuth"); 117 map.put(ObjectIdentifier.newInternal(codeSigningOidData), "codeSigning"); 118 map.put(ObjectIdentifier.newInternal(emailProtectionOidData), "emailProtection"); 119 map.put(ObjectIdentifier.newInternal(ipsecEndSystemOidData), "ipsecEndSystem"); 120 map.put(ObjectIdentifier.newInternal(ipsecTunnelOidData), "ipsecTunnel"); 121 map.put(ObjectIdentifier.newInternal(ipsecUserOidData), "ipsecUser"); 122 map [all...] |
/libcore/ojluni/src/main/java/java/sql/ |
H A D | Ref.java | 70 * using the given type map. 72 * @param map a <code>java.util.Map</code> object that contains 86 Object getObject(java.util.Map<String,Class<?>> map) throws SQLException; argument 91 * this <code>Ref</code> object. If the connection's type map has an entry 93 * the Java class indicated in the type map. Otherwise, the
|
/libcore/ojluni/src/main/java/sun/util/locale/ |
H A D | LocaleObjectCache.java | 40 private ConcurrentMap<K, CacheEntry<K, V>> map; field in class:LocaleObjectCache 48 map = new ConcurrentHashMap<>(initialCapacity, loadFactor, concurrencyLevel); 55 CacheEntry<K, V> entry = map.get(key); 71 entry = map.putIfAbsent(key, newEntry); 77 map.put(key, newEntry); 87 CacheEntry<K, V> oldEntry = map.put(key, entry); 95 map.remove(entry.getKey());
|
/libcore/ojluni/src/test/java/util/stream/test/org/openjdk/tests/java/util/stream/ |
H A D | IntReduceTest.java | 49 assertEquals(110, Arrays.stream(a).map(irDoubler).reduce(irPlus).getAsInt()); 50 assertEquals(20, Arrays.stream(a).map(irDoubler).reduce(irMax).getAsInt()); 51 assertEquals(2, Arrays.stream(a).map(irDoubler).reduce(irMin).getAsInt()); 70 seedless = exerciseTerminalOps(data, s -> s.map(irDoubler), s -> s.reduce(irPlus)); 71 folded = exerciseTerminalOps(data, s -> s.map(irDoubler), s -> s.reduce(0, irPlus)); 74 seedless = exerciseTerminalOps(data, s -> s.map(irDoubler), s -> s.reduce(irMin)); 75 folded = exerciseTerminalOps(data, s -> s.map(irDoubler), s -> s.reduce(Integer.MAX_VALUE, irMin)); 78 seedless = exerciseTerminalOps(data, s -> s.map(irDoubler), s -> s.reduce(irMax)); 79 folded = exerciseTerminalOps(data, s -> s.map(irDoubler), s -> s.reduce(Integer.MIN_VALUE, irMax));
|
H A D | ReduceTest.java | 55 assertEquals(110, (int) list.stream().map(mDoubler).reduce(rPlus).get()); 56 assertEquals(20, (int) list.stream().map(mDoubler).reduce(rMax).get()); 57 assertEquals(2, (int) list.stream().map(mDoubler).reduce(rMin).get()); 76 seedless = exerciseTerminalOps(data, s -> s.map(mDoubler), s -> s.reduce(rPlus)); 77 folded = exerciseTerminalOps(data, s -> s.map(mDoubler), s -> s.reduce(0, rPlus, rPlus)); 80 seedless = exerciseTerminalOps(data, s -> s.map(mDoubler), s -> s.reduce(rMin)); 81 folded = exerciseTerminalOps(data, s -> s.map(mDoubler), s -> s.reduce(Integer.MAX_VALUE, rMin, rMin)); 84 seedless = exerciseTerminalOps(data, s -> s.map(mDoubler), s -> s.reduce(rMax)); 85 folded = exerciseTerminalOps(data, s -> s.map(mDoubler), s -> s.reduce(Integer.MIN_VALUE, rMax, rMax));
|
H A D | StreamLinkTest.java | 64 List<Integer> expected = data.stream().map(e -> (Integer) (e + n)).collect(Collectors.toList()); 67 stream(apply(n, (Stream<Integer> s) -> s.map(e -> (Integer) (e + 1)))). 77 int[] expected = data.stream().map(e -> e + n).toArray(); 80 stream(apply(n, (IntStream s) -> s.map(e -> e + 1))). 90 long[] expected = data.stream().map(e -> e + n).toArray(); 93 stream(apply(n, (LongStream s) -> s.map(e -> e + 1L))). 103 double[] expected = data.stream().map(e -> accumulate(e, n)).toArray(); 106 stream(apply(n, (DoubleStream s) -> s.map(e -> e + 1.0))).
|
/libcore/ojluni/src/main/java/java/time/format/ |
H A D | DateTimeTextProvider.java | 270 Map<String, Integer> map = CalendarDataUtility.retrieveJavaTimeFieldValueNames( 272 if (map == null) { 275 List<Entry<String, Long>> list = new ArrayList<>(map.size()); 278 for (Map.Entry<String, Integer> entry : map.entrySet()) { 291 for (Map.Entry<String, Integer> entry : map.entrySet()) { 296 for (Map.Entry<String, Integer> entry : map.entrySet()) { 301 for (Map.Entry<String, Integer> entry : map.entrySet()) { 339 Map<Long, String> map = new HashMap<>(); 341 map.put((long) entry.getValue(), entry.getKey()); 343 if (!map [all...] |
/libcore/jsr166-tests/src/test/java/jsr166/ |
H A D | ConcurrentHashMap8Test.java | 41 * Returns a new map from Integers 1-5 to Strings "A"-"E". 44 ConcurrentHashMap map = new ConcurrentHashMap(5); 45 assertTrue(map.isEmpty()); 46 map.put(one, "A"); 47 map.put(two, "B"); 48 map.put(three, "C"); 49 map.put(four, "D"); 50 map.put(five, "E"); 51 assertFalse(map.isEmpty()); 52 assertEquals(5, map [all...] |
/libcore/support/src/test/java/tests/support/ |
H A D | Support_MapTest.java | 31 // must be a map containing the string keys "0"-"99" paired with the Integer 48 new Support_UnmodifiableCollectionTest("values() from map test", modifiableMap.values()) 50 new Support_UnmodifiableCollectionTest("values() from unmodifiable map test", 60 private void testContents(Map<String, Integer> map) { argument 62 assertTrue("Size should return 100, returned: " + map.size(), map.size() == 100); 65 assertTrue("Should contain the key \"0\"", map.containsKey("0")); 66 assertTrue("Should contain the key \"50\"", map.containsKey("50")); 67 assertTrue("Should not contain the key \"100\"", !map.containsKey("100")); 70 assertTrue("Should contain the value 0", map [all...] |
/libcore/ojluni/src/main/java/java/util/jar/ |
H A D | Attributes.java | 59 protected Map<Object,Object> map; field in class:Attributes 75 map = new HashMap<>(size); 85 map = new HashMap<>(attr); 98 return map.get(name); 149 return map.put((Attributes.Name)name, (String)value); 180 return map.remove(name); 192 return map.containsValue(value); 202 return map.containsKey(name); 209 * @param attr the Attributes to be stored in this map 224 map [all...] |
/libcore/dom/src/test/java/org/w3c/domts/level2/core/ |
H A D | setNamedItemNS01.java | 40 * Invoke method setNamedItemNS(arg) on the map of the first "address" element with 83 NamedNodeMap map; 91 map = testAddress.getAttributes(); 96 setNode = map.setNamedItemNS(arg);
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/lang/ |
H A D | SystemTest.java | 311 Map map = System.getenv(); 313 map.containsKey(null); 320 map.containsKey(new Integer(10)); 327 map.containsValue(null); 334 map.containsValue(new Integer(10)); 341 map.get(null); 348 map.get(new Integer(10)); 355 map.put(null, "AAA"); 362 map.put("AAA", new Integer(10)); 369 map [all...] |