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

1234

/dalvik/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.java31 Map<String, Integer> map; field in class:Support_UnmodifiableMapTest
33 // must be a map containing the string keys "0"-"99" paired with the Integer
42 map = m;
48 assertTrue("UnmodifiableMapTest - Should contain the key \"0\"", map
50 assertTrue("UnmodifiableMapTest - Should contain the key \"50\"", map
53 !map.containsKey("100"));
56 assertTrue("UnmodifiableMapTest - Should contain the value 0", map
58 assertTrue("UnmodifiableMapTest - Should contain the value 50", map
60 assertTrue("UnmodifiableMapTest - Should not contain value 100", !map
64 Set<?> entrySet = map
[all...]
/dalvik/libdex/
H A DDexDataMap.c18 * Verification-time map of data section items
34 DexDataMap* map = NULL; local
44 map = malloc(size);
46 if (map == NULL) {
50 map->count = 0;
51 map->max = maxCount;
52 map->offsets = (u4*) (map + 1);
53 map->types = (u2*) (map
61 dexDataMapFree(DexDataMap* map) argument
74 dexDataMapAdd(DexDataMap* map, u4 offset, u2 type) argument
94 dexDataMapGet(DexDataMap* map, u4 offset) argument
125 dexDataMapVerify(DexDataMap* map, u4 offset, u2 type) argument
[all...]
H A DDexDataMap.h18 * Verification-time map of data section items
27 u4 count; /* number of items currently in the map */
41 void dexDataMapFree(DexDataMap* map);
44 * Add a new element to the map. The offset must be greater than the
47 void dexDataMapAdd(DexDataMap* map, u4 offset, u2 type);
53 int dexDataMapGet(DexDataMap* map, u4 offset);
56 * Verify that there is an entry in the map, mapping the given offset to
60 bool dexDataMapVerify(DexDataMap* map, u4 offset, u2 type);
65 DEX_INLINE bool dexDataMapVerify0Ok(DexDataMap* map, u4 offset, u2 type) { argument
70 return dexDataMapVerify(map, offse
[all...]
/dalvik/libcore/luni/src/test/java/org/apache/harmony/luni/tests/java/util/
H A DIdentityHashMapTest.java74 IdentityHashMap map = new IdentityHashMap();
78 result = map.put(null, null);
79 assertTrue("testA can not find null key", map.containsKey(null));
80 assertTrue("testA can not find null value", map.containsValue(null));
82 map.get(null));
87 result = map.put(null, value);
88 assertTrue("testB can not find null key", map.containsKey(null));
89 assertTrue("testB can not find a value with null key", map
92 map.get(null) == value);
97 result = map
[all...]
H A DAbstractMapTest.java197 private Map map = new HashMap();
200 return map.entrySet();
204 return map.put(key, value);
208 return map;
220 MyMap map = new MyMap();
221 map.put("one", "1");
222 Map.Entry entry = (Map.Entry) map.entrySet().iterator().next();
225 MyMap mapClone = (MyMap) map.clone();
226 assertTrue("clone not shallow", map.getMap() == mapClone.getMap());
251 AbstractMap map
[all...]
H A DHashMapTest.java53 HashMap map = new HashMap();
54 map.put("a", "a");
55 SubMap map2 = new SubMap(map);
/dalvik/libcore/concurrent/src/test/java/tests/api/java/util/concurrent/
H A DConcurrentHashMapTest.java26 * Create a map from Integers 1-5 to Strings "A"-"E".
29 ConcurrentHashMap map = new ConcurrentHashMap(5);
30 assertTrue(map.isEmpty());
31 map.put(one, "A");
32 map.put(two, "B");
33 map.put(three, "C");
34 map.put(four, "D");
35 map.put(five, "E");
36 assertFalse(map.isEmpty());
37 assertEquals(5, map
[all...]
/dalvik/dx/src/com/android/dx/ssa/
H A DRegisterMapper.java41 public abstract RegisterSpec map(RegisterSpec registerSpec); method in class:RegisterMapper
48 public final RegisterSpecList map(RegisterSpecList sources) { method in class:RegisterMapper
53 newSources.set(i, map(sources.get(i)));
/dalvik/libcore/archive/src/main/java/java/util/jar/
H A DAttributes.java41 protected Map<Object, Object> map; field in class:Attributes
271 map = new HashMap<Object, Object>();
283 map = (Map<Object, Object>) ((HashMap) attrib.map).clone();
294 map = new HashMap<Object, Object>(size);
301 map.clear();
312 return map.containsKey(key);
323 return map.containsValue(value);
327 * Returns a set containing map entries for each of the key/value pair
333 return map
[all...]
/dalvik/libcore/sql/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
/dalvik/libcore/luni/src/main/java/org/apache/harmony/luni/util/
H A DBase64.java125 private static final byte[] map = new byte[] field in class:Base64
138 out[index++] = map[(in[i] & 0xff) >> 2];
139 out[index++] = map[((in[i] & 0x03) << 4)
141 out[index++] = map[((in[i+1] & 0x0f) << 2)
143 out[index++] = map[(in[i+2] & 0x3f)];
153 out[index++] = map[(in[end] & 0xff) >> 2];
154 out[index++] = map[(in[end] & 0x03) << 4];
159 out[index++] = map[(in[end] & 0xff) >> 2];
160 out[index++] = map[((in[end] & 0x03) << 4)
162 out[index++] = map[((i
[all...]
/dalvik/libcore/luni/src/main/java/java/net/
H A DAddressCache.java32 * This should be a power of two to avoid wasted space in our custom map.
48 private final Map<String, AddressCacheEntry> map; field in class:AddressCache
71 map = new LinkedHashMap<String, AddressCacheEntry>(0, DEFAULT_LOAD_FACTOR, true) {
74 // the map will have grown to accommodate it. Using == lets us prevent resizing.
86 synchronized (map) {
87 entry = map.get(hostname);
117 synchronized (map) {
118 map.put(hostname, new AddressCacheEntry(addresses, expiryNanos));
/dalvik/libcore/security/src/main/java/org/apache/harmony/security/asn1/
H A DASN1Choice.java67 * So a custom ASN.1 Time choice type should map its notation to Date object.
238 // create map of all identifiers
239 TreeMap map = new TreeMap();
254 addIdentifier(map, choiceToAdd[0][j], index);
261 addIdentifier(map, t.id, index);
266 addIdentifier(map, t.constrId, index);
271 int size = map.size();
273 Iterator it = map.entrySet().iterator();
286 private void addIdentifier(TreeMap map, int identifier, int index){ argument
287 if (map
[all...]
/dalvik/libcore/luni-kernel/src/main/java/java/lang/
H A DSystem.java284 * Returns an unmodifiable map of all available environment variables.
286 * @return the map representing all environment variables.
299 Map<String, String> map = new HashMap<String, String>();
306 map.put(entry.substring(0, pos), entry.substring(pos + 1));
312 return new SystemEnvironment(map);
683 * mandates that this map be read-only, so we wrap our real map into this one
690 private Map<String, String> map; field in class:SystemEnvironment
692 public SystemEnvironment(Map<String, String> map) { argument
693 this.map
743 putAll(Map map) argument
[all...]
/dalvik/vm/analysis/
H A DReduceConstants.h23 #define DVM_RC_DISABLED 0 /* no reduction, 1:1 map */
45 int origCount; /* original size; describes range of entries in map */
47 u2* mapToNew; /* sparse map, from "orig" to "new" */
48 u2* mapToOld; /* dense map, from "new" back to "orig" */
52 IndexMap map[kNumIndexMaps]; member in struct:IndexMapSet
68 /* free an index map set */
H A DReduceConstants.c109 a larger map table, increasing the size of the DEX on disk. One nice
201 For approach #1: map from original indices to the reduced set.
219 For approach #2: map from the reduced set back to the originals.
452 const IndexMap* pMap = &pIndexMapSet->map[whichMap];
484 newIdx = pIndexMapSet->map[kMapStrings].mapToNew[*ptr];
781 * Fill out an index map set entry.
783 * If we can't fit the map into our base type, we don't create the map.
853 chunkLen += pIndexMapSet->map[i].origCount * sizeof(u2);
868 int dataLen = pIndexMapSet->map[
[all...]
/dalvik/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);
/dalvik/libcore/icu/src/main/java/com/ibm/icu4jni/charset/
H A DCharsetProviderICU.java65 * Adds an entry to the given map whose key is the charset's
67 * @param map a map to receive charset objects and names
70 public final void putCharsets(Map map) { argument
75 if (!map.containsKey(charsets[i])){
76 map.put(charsets[i], charsetForName(charsets[i]));
/dalvik/libcore/nio/src/test/java/org/apache/harmony/nio/tests/java/nio/
H A DMappedByteBufferTest.java96 MappedByteBuffer mmbRead = fileChannelRead.map(MapMode.READ_ONLY, 0,
103 MappedByteBuffer resultRead = fileChannelR.map(MapMode.READ_ONLY, 0,
114 MappedByteBuffer mmbReadWrite = fileChannelReadWrite.map(
122 MappedByteBuffer resultReadWrite = fileChannelRW.map(
146 MappedByteBuffer mmbRead = fileChannelRead.map(MapMode.READ_ONLY, 0,
153 MappedByteBuffer mmbReadWrite = fileChannelReadWrite.map(
174 buf = fc.map(FileChannel.MapMode.READ_WRITE, 0, capacity);
/dalvik/libcore/luni/src/test/java/tests/api/java/util/
H A DTreeMapTest.java190 assertTrue("New tree map does not answer correct comparator",
217 assertEquals("Cleared map returned non-zero size", 0, tm.size());
232 assertTrue("Cloned map does not equal the original map", clonedMap
234 assertTrue("Cloned map is the same reference as the original map",
237 assertTrue("Cloned map contains incorrect elements", clonedMap
241 TreeMap map = new TreeMap();
242 map.put("key", "value");
244 Set keys = map
[all...]
H A DHashMapTest.java188 HashMap map = new HashMap();
189 map.put("key", "value");
191 Set keys = map.keySet();
192 Collection values = map.values();
197 AbstractMap map2 = (AbstractMap) map.clone();
201 // values() and keySet() on the cloned() map should be different
346 HashMap map = new HashMap();
348 map.put(k, "value1");
351 assertNull(map.get(k));
354 assertNull(map
[all...]
H A DAbstractMapTest.java197 private Map map = new HashMap();
200 return map.entrySet();
204 return map.put(key, value);
208 return map;
220 MyMap map = new MyMap();
221 map.put("one", "1");
222 Map.Entry entry = (Map.Entry) map.entrySet().iterator().next();
225 MyMap mapClone = (MyMap) map.clone();
226 assertTrue("clone not shallow", map.getMap() == mapClone.getMap());
/dalvik/libcore/xml/src/main/java/org/apache/xml/serializer/
H A DNamespaceMappings.java93 * ensure prefix/uri map scopes are closed correctly.
222 * @param uri a String with the uri to which the prefix is to map
251 MappingRecord map = new MappingRecord(prefix,uri,elemDepth);
252 stack.push(map);
253 m_nodeStack.push(map);
271 MappingRecord map = (MappingRecord) (m_nodeStack.peek());
272 int depth = map.m_declarationDepth;
273 if (elemDepth < 1 || map.m_declarationDepth < elemDepth)
281 String prefix = map.m_prefix;
480 * An array of zero elements is returned if no prefixes map t
[all...]

Completed in 457 milliseconds

1234