Searched defs:map (Results 1 - 25 of 39) sorted by relevance

12

/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/main/java/java/sql/
H A DRef.java62 * @param map
69 public Object getObject(Map<String, Class<?>> map) throws SQLException; argument
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 DConnection.java752 * Sets the {@code TypeMap} for this connection. The input {@code map}
755 * @param map
756 * the new type map.
759 * map} is not an instance of {@link Map}.
761 public void setTypeMap(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/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...]
H A DURLClassLoader.java67 private HashMap<String, ArrayList<URL>> map; field in class:URLClassLoader.IndexFile
136 public IndexFile(HashMap<String, ArrayList<URL>> map) { argument
137 this.map = map;
141 return map.get(name);
/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);
77 V previous = map.put(key, value);
83 while (map.size() > maxSize) {
84 Map.Entry<K, V> toEvict = map.eldest();
88 map.remove(key);
114 return new LinkedHashMap<K, V>(map);
/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.java37 TreeMap<String, String> map = new TreeMap<String, String>();
38 map.put("A", "a");
39 map.put("B", "b");
40 map.put("C", "c");
42 Iterator<Entry<String, String>> iterator = map.entrySet().iterator();
46 assertEquals("x", map.get("A"));
52 assertEquals("y", map.get("B"));
54 assertEquals("z", map.get("C"));
58 * Test that the entrySet() method of a sub map produces correctly mutable
59 * entries that propagate changes to the original map
116 assertAllEntryMethodsReturnImmutableEntries(NavigableMap<String, String> map) argument
[all...]
/libcore/luni/src/main/java/java/util/
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 DAbstractMap.java237 * it is not a map or of a different size, this returns false. Otherwise it
239 * object}. If any value does not equal the other map's value for the same
247 Map<?, ?> map = (Map<?, ?>) object;
248 if (size() != map.size()) {
256 Object theirs = map.get(key);
258 if (theirs != null || !map.containsKey(key)) {
328 * <p>This implementation returns a view that calls through this to map. Its
329 * iterator transforms this map's entry set iterator to return keys.
376 * <p>This implementation iterates through {@code map}'s entry set, calling
379 public void putAll(Map<? extends K, ? extends V> map) { argument
[all...]
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...]
H A DLinkedHashMap.java34 * If one thread of several threads accessing an instance modifies the map
35 * structurally, access to the map needs to be synchronized. For
42 * may throw a {@code ConcurrentModificationException} if the map is structurally
52 * A dummy entry in the circular linked list of entries in the map.
54 * If the map is empty, header.nxt == header && header.prv == header.
76 * the initial capacity of this map.
89 * the initial capacity of this map.
105 * the initial capacity of this hash map.
126 * from the specified map. The order of the elements is preserved.
128 * @param map
131 LinkedHashMap(Map<? extends K, ? extends V> map) argument
[all...]
H A DWeakHashMap.java196 * the initial capacity of this map.
216 * the initial capacity of this map.
239 * from the specified map.
241 * @param map
244 public WeakHashMap(Map<? extends K, ? extends V> map) { argument
245 this(map.size() < 6 ? 11 : map.size() * 2);
246 putAllImpl(map);
250 * Removes all mappings from this map, leaving it empty.
272 * Returns whether this map contain
653 putAll(Map<? extends K, ? extends V> map) argument
708 putAllImpl(Map<? extends K, ? extends V> map) argument
[all...]
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.
297 * Creates an IdentityHashMap using the given map as initial values.
299 * @param map
302 IdentityHashMap(Map<? extends K, ? extends V> map) argument
502 putAll(Map<? extends K, ? extends V> map) argument
819 putAllImpl(Map<? extends K, ? extends V> map) argument
[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/nio/channels/
H A DFileChannel.java114 * @return this map mode as string.
265 * the size of the region to map into memory.
280 public abstract MappedByteBuffer map(FileChannel.MapMode mode, method in class:FileChannel
/libcore/luni/src/main/native/
H A DNetworkUtilities.cpp103 static bool inetAddressToSockaddr(JNIEnv* env, jobject inetAddress, int port, sockaddr_storage& ss, socklen_t& sa_len, bool map) { argument
175 if (map) {
/libcore/luni/src/main/java/java/nio/
H A DFileChannelImpl.java216 public final MappedByteBuffer map(MapMode mapMode, long position, long size) throws IOException { method in class:FileChannelImpl
385 ByteBuffer buffer = fileSrc.map(MapMode.READ_ONLY, filePosition, count);
444 buffer = map(MapMode.READ_ONLY, position, count);
/libcore/luni/src/main/java/java/util/concurrent/
H A DConcurrentSkipListSet.java62 * The underlying map. Uses Boolean.TRUE as value for each
444 // Support for resetting map in clone
445 private void setMap(ConcurrentNavigableMap<E,Object> map) { argument
446 UNSAFE.putObjectVolatile(this, mapOffset, map);
/libcore/luni/src/main/java/java/util/jar/
H A DAttributes.java39 protected Map<Object, Object> map; field in class:Attributes
187 map = new HashMap<Object, Object>();
199 map = (Map<Object, Object>) ((HashMap) attrib.map).clone();
210 map = new HashMap<Object, Object>(size);
217 map.clear();
228 return map.containsKey(key);
239 return map.containsValue(value);
243 * Returns a set containing map entries for each of the key/value pair
249 return map
[all...]
/libcore/luni/src/main/java/java/lang/
H A DSystem.java214 * Returns an unmodifiable map of all environment variables to their values.
217 Map<String, String> map = new HashMap<String, String>();
221 map.put(entry.substring(0, index), entry.substring(index + 1));
224 return new SystemEnvironment(map);
645 * The unmodifiable environment variables map. System.getenv() specifies
646 * that this map must throw when passed non-String keys.
649 private final Map<String, String> map; field in class:System.SystemEnvironment
651 public SystemEnvironment(Map<String, String> map) { argument
652 this.map = Collections.unmodifiableMap(map);
[all...]

Completed in 3060 milliseconds

12