Searched refs:map (Results 1 - 25 of 57) sorted by relevance

123

/libcore/support/src/test/java/tests/support/
H A DSupport_MapTest2.java25 Map<String, String> map; field in class:Support_MapTest2
29 map = m;
30 if (!map.isEmpty()) {
38 map.put("one", "1");
39 assertEquals("size should be one", 1, map.size());
40 map.clear();
41 assertEquals("size should be zero", 0, map.size());
42 assertTrue("Should not have entries", !map.entrySet().iterator()
44 assertTrue("Should not have keys", !map.keySet().iterator()
46 assertTrue("Should not have values", !map
[all...]
H A DSupport_UnmodifiableMapTest.java28 Map<String, Integer> map; field in class:Support_UnmodifiableMapTest
30 // must be a map containing the string keys "0"-"99" paired with the Integer
39 map = m;
45 assertTrue("UnmodifiableMapTest - Should contain the key \"0\"", map
47 assertTrue("UnmodifiableMapTest - Should contain the key \"50\"", map
50 !map.containsKey("100"));
53 assertTrue("UnmodifiableMapTest - Should contain the value 0", map
55 assertTrue("UnmodifiableMapTest - Should contain the value 50", map
57 assertTrue("UnmodifiableMapTest - Should not contain value 100", !map
61 Set<?> entrySet = map
[all...]
/libcore/luni/src/test/java/libcore/java/util/
H A DOldAndroidHashMapTest.java29 private void addItems(HashMap<String, Integer> map) { argument
30 map.put("one", ONE);
31 map.put("two", TWO);
32 map.put("three", THREE);
33 map.put("four", FOUR);
35 assertEquals(4, map.size());
37 assertEquals(ONE, map.get("one"));
38 assertEquals(TWO, map.get("two"));
39 assertEquals(THREE, map.get("three"));
40 assertEquals(FOUR, map
[all...]
H A DTreeMapTest.java36 TreeMap<String, String> map = new TreeMap<String, String>();
37 map.put("A", "a");
38 map.put("B", "b");
39 map.put("C", "c");
41 Iterator<Entry<String,String>> iterator = map.entrySet().iterator();
45 assertEquals("x", map.get("A"));
51 assertEquals("y", map.get("B"));
53 assertEquals("z", map.get("C"));
58 * propagate changes to the original map.
61 TreeMap<String, String> map
115 assertAllEntryMethodsReturnImmutableEntries(NavigableMap<String, String> map) argument
[all...]
H A DOldLinkedHashMapTest.java29 LinkedHashMap map = new LinkedHashMap<String, String>(10, 0.75f, true);
31 map.put("key1", "value1");
32 map.put("key2", "value2");
33 map.put("key3", "value3");
35 Iterator iterator = map.keySet().iterator();
37 map.get(id);
49 LinkedHashMap mapClone = (LinkedHashMap) map.clone();
51 iterator = map.keySet().iterator();
H A DOldTreeMapTest.java140 assertTrue("New tree map does not answer correct comparator",
214 assertEquals("Returned map of incorrect size", 3, head.size());
241 TreeMap<Integer, Double> map = new TreeMap<Integer, Double>(
243 map.put(1, 2.1);
244 map.put(2, 3.1);
245 map.put(3, 4.5);
246 map.put(7, 21.3);
247 map.put(null, null);
249 SortedMap<Integer, Double> smap = map.headMap(null);
421 SortedMap<String, String> map
[all...]
/libcore/luni/src/main/java/java/util/jar/
H A DAttributes.java39 protected Map<Object, Object> map; field in class:Attributes
184 map = new HashMap<Object, Object>();
196 map = (Map<Object, Object>) ((HashMap) attrib.map).clone();
207 map = new HashMap<Object, Object>(size);
214 map.clear();
225 return map.containsKey(key);
236 return map.containsValue(value);
240 * Returns a set containing map entries for each of the key/value pair
246 return map
[all...]
/libcore/luni/src/main/java/libcore/util/
H A DBasicLruCache.java27 private final LinkedHashMap<K, V> map; field in class:BasicLruCache
35 this.map = new LinkedHashMap<K, V>(0, 0.75f, true);
49 V result = map.get(key);
57 map.put(key, result);
75 V previous = map.put(key, value);
81 while (map.size() > maxSize) {
82 Map.Entry<K, V> toEvict = map.eldest();
86 map.remove(key);
112 return new LinkedHashMap<K, V>(map);
/libcore/luni/src/main/java/java/sql/
H A DArray.java63 * @param map
64 * the map defining the correspondence between SQL type names
70 public Object getArray(long index, int count, Map<String, Class<?>> map) argument
76 * @param map
77 * the map defining the correspondence between SQL type names
83 public Object getArray(Map<String, Class<?>> map) throws SQLException; argument
141 * @param map
142 * the map defining the correspondence between SQL type names
150 Map<String, Class<?>> map) throws SQLException;
156 * @param map
149 getResultSet(long index, int count, Map<String, Class<?>> map) argument
163 getResultSet(Map<String, Class<?>> map) argument
[all...]
H A DRef.java62 * @param map
69 public Object getObject(Map<String, Class<?>> map) throws SQLException; argument
/libcore/luni/src/main/java/libcore/io/
H A DBase64.java128 private static final byte[] map = new byte[] field in class:Base64
140 out[index++] = map[(in[i] & 0xff) >> 2];
141 out[index++] = map[((in[i] & 0x03) << 4) | ((in[i+1] & 0xff) >> 4)];
142 out[index++] = map[((in[i+1] & 0x0f) << 2) | ((in[i+2] & 0xff) >> 6)];
143 out[index++] = map[(in[i+2] & 0x3f)];
147 out[index++] = map[(in[end] & 0xff) >> 2];
148 out[index++] = map[(in[end] & 0x03) << 4];
153 out[index++] = map[(in[end] & 0xff) >> 2];
154 out[index++] = map[((in[end] & 0x03) << 4) | ((in[end+1] & 0xff) >> 4)];
155 out[index++] = map[((i
[all...]
/libcore/luni/src/main/java/org/apache/harmony/security/asn1/
H A DASN1Choice.java65 * So a custom ASN.1 Time choice type should map its notation to Date object.
235 // create map of all identifiers
236 TreeMap<BigInteger, BigInteger> map = new TreeMap<BigInteger, BigInteger>();
249 addIdentifier(map, choiceToAdd[0][j], index);
256 addIdentifier(map, t.id, index);
261 addIdentifier(map, t.constrId, index);
266 int size = map.size();
268 Iterator<Map.Entry<BigInteger, BigInteger>> it = map.entrySet().iterator();
281 private void addIdentifier(TreeMap<BigInteger, BigInteger> map, int identifier, int index){ argument
282 if (map
[all...]
/libcore/luni/src/main/java/java/net/
H A DCookieStoreImpl.java31 /** this map may have null keys! */
32 private final Map<URI, List<HttpCookie>> map = new HashMap<URI, List<HttpCookie>>(); field in class:CookieStoreImpl
40 List<HttpCookie> cookies = map.get(uri);
43 map.put(uri, cookies);
69 List<HttpCookie> cookiesForUri = map.get(uri);
82 for (Map.Entry<URI, List<HttpCookie>> entry : map.entrySet()) {
106 for (List<HttpCookie> list : map.values()) {
120 List<URI> result = new ArrayList<URI>(map.keySet());
130 List<HttpCookie> cookies = map.get(cookiesUri(uri));
139 boolean result = !map
[all...]
/libcore/dom/src/test/java/org/w3c/domts/level2/core/
H A DsetNamedItemNS01.java40 * 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/luni/src/test/java/tests/api/java/util/
H A DIdentityHashMapTest.java140 IdentityHashMap map = new IdentityHashMap();
141 map.put("key", "value");
143 Set keys = map.keySet();
144 Collection values = map.values();
149 AbstractMap map2 = (AbstractMap) map.clone();
153 // values() and keySet() on the cloned() map should be different
235 assertTrue("Returned false for new map", new IdentityHashMap()
257 Map map = new IdentityHashMap(101);
258 map.put(new Integer(1), "1");
259 map
[all...]
H A DHashMapTest.java146 HashMap map = new HashMap();
147 map.put("key", "value");
149 Set keys = map.keySet();
150 Collection values = map.values();
155 AbstractMap map2 = (AbstractMap) map.clone();
159 // values() and keySet() on the cloned() map should be different
268 HashMap map = new HashMap();
270 map.put(k, "value1");
273 assertNull(map.get(k));
276 assertNull(map
[all...]
H A DWeakHashMapTest.java125 WeakHashMap map = new WeakHashMap(mockMap);
126 assertEquals("Size should be 0", 0, map.size());
145 assertTrue("Cleared map should be empty", whm.isEmpty());
147 assertNull("Cleared map should only return null", whm
198 assertTrue("Invalid map entry returned--bad key", keys
200 assertTrue("Invalid map entry returned--bad key", values
226 assertTrue("New map should be empty", whm.isEmpty());
240 WeakHashMap map = new WeakHashMap();
241 map.put(null, "value"); // add null key
244 map
[all...]
H A DAbstractMapTest.java168 private Map map = new HashMap();
171 return map.entrySet();
175 return map.put(key, value);
179 return map;
191 MyMap map = new MyMap();
192 map.put("one", "1");
193 Map.Entry entry = (Map.Entry) map.entrySet().iterator().next();
196 MyMap mapClone = (MyMap) map.clone();
197 assertTrue("clone not shallow", map.getMap() == mapClone.getMap());
H A DHashtableTest.java120 Map map = new TreeMap();
123 map.put("Gah", firstVal);
124 map.put("Ooga", secondVal);
125 Hashtable ht = new Hashtable(map);
143 Map<String, Void> map = Collections.singletonMap("Dog", null);
145 new Hashtable<String, Void>(map);
478 Map map = new Hashtable(101);
479 map.put(new Integer(1), "1");
480 map.put(new Integer(102), "102");
481 map
[all...]
/libcore/luni/src/main/java/java/lang/
H A DSystem.java222 * Returns an unmodifiable map of all available environment variables.
224 * @return the map representing all environment variables.
227 Map<String, String> map = new HashMap<String, String>();
231 map.put(entry.substring(0, index), entry.substring(index + 1));
234 return new SystemEnvironment(map);
653 * The unmodifiable environment variables map. System.getenv() specifies
654 * that this map must throw when passed non-String keys.
657 private final Map<String, String> map; field in class:System.SystemEnvironment
659 public SystemEnvironment(Map<String, String> map) { argument
660 this.map
[all...]
/libcore/luni/src/main/java/java/util/
H A DIdentityHashMap.java58 * maximum number of elements that can be put in this map before having to
81 * map.
86 private final IdentityHashMap<K,V> map; field in class:IdentityHashMap.IdentityHashMapEntry
88 IdentityHashMapEntry(IdentityHashMap<K,V> map, K theKey, V theValue) { argument
90 this.map = map;
124 map.put(key, object);
261 * this map.
298 * Creates an IdentityHashMap using the given map as initial values.
300 * @param map
303 IdentityHashMap(Map<? extends K, ? extends V> map) argument
503 putAll(Map<? extends K, ? extends V> map) argument
820 putAllImpl(Map<? extends K, ? extends V> map) argument
[all...]
H A DMap.java99 * @return {@code true} if this map contains the specified key,
109 * @return {@code true} if this map contains the specified value,
156 * Returns whether this map is empty.
158 * @return {@code true} if this map has no elements, {@code false}
198 * @param map
211 public void putAll(Map<? extends K,? extends V> map); argument
250 * @return a collection of the values contained in this map.
H A DTreeSet.java43 TreeSet(NavigableMap<E, Object> map) { argument
44 backingMap = map;
489 TreeMap<E, Object> map = new TreeMap<E, Object>(
495 map.put(elem, Boolean.TRUE);
498 backingMap = map;
H A DEnumMap.java411 * @param map
414 * if {@code map} is {@code null}.
416 public EnumMap(EnumMap<K, ? extends V> map) { argument
417 initialization(map);
421 * Constructs an {@code EnumMap} initialized from the given map. If the given map
423 * way as {@link EnumMap#EnumMap(EnumMap)}}. Otherwise, the given map
426 * @param map
427 * the map from which this {@code EnumMap} is initialized.
429 * if {@code map} i
435 EnumMap(Map<K, ? extends V> map) argument
653 putAll(Map<? extends K, ? extends V> map) argument
765 putAllImpl(Map map) argument
[all...]
/libcore/luni/src/test/java/tests/org/w3c/dom/
H A DSetNamedItemNS.java40 * Invoke method setNamedItemNS(arg) on the map of the first "address" element with
83 NamedNodeMap map;
91 map = testAddress.getAttributes();
96 map.setNamedItemNS(arg);

Completed in 260 milliseconds

123