/** * Return the map object representing this LazyMap. Note that the keyObjects * will be Writable primitive objects. * * @return the map object */ public Map<Object, Object> getMap() { if (!parsed) { parse(); } if (cachedMap != null) { return cachedMap; } // Use LinkedHashMap to provide deterministic order cachedMap = new LinkedHashMap<Object, Object>(); // go through each element of the map for (int i = 0; i < mapSize; i++) { LazyPrimitive<?, ?> lazyKey = uncheckedGetKey(i); if (lazyKey == null) { continue; } Object key = lazyKey.getObject(); // do not overwrite if there are duplicate keys if (key != null && !cachedMap.containsKey(key)) { cachedMap.put(key, uncheckedGetValue(i)); } } return cachedMap; }
return uncheckedGetValue(i);
/** * Return the map object representing this LazyMap. Note that the keyObjects * will be Writable primitive objects. * * @return the map object */ public Map<Object, Object> getMap() { if (!parsed) { parse(); } if (cachedMap != null) { return cachedMap; } // Use LinkedHashMap to provide deterministic order cachedMap = new LinkedHashMap<Object, Object>(); // go through each element of the map for (int i = 0; i < mapSize; i++) { LazyPrimitive<?, ?> lazyKey = uncheckedGetKey(i); if (lazyKey == null) { continue; } Object key = lazyKey.getObject(); // do not overwrite if there are duplicate keys if (key != null && !cachedMap.containsKey(key)) { cachedMap.put(key, uncheckedGetValue(i)); } } return cachedMap; }
/** * Return the map object representing this LazyMap. Note that the keyObjects * will be Writable primitive objects. * * @return the map object */ public Map<Object, Object> getMap() { if (!parsed) { parse(); } if (cachedMap != null) { return cachedMap; } // Use LinkedHashMap to provide deterministic order cachedMap = new LinkedHashMap<Object, Object>(); // go through each element of the map for (int i = 0; i < mapSize; i++) { LazyPrimitive<?, ?> lazyKey = uncheckedGetKey(i); if (lazyKey == null) { continue; } Object key = lazyKey.getObject(); // do not overwrite if there are duplicate keys if (key != null && !cachedMap.containsKey(key)) { cachedMap.put(key, uncheckedGetValue(i)); } } return cachedMap; }
/** * Return the map object representing this LazyMap. Note that the keyObjects * will be Writable primitive objects. * * @return the map object */ public Map<Object, Object> getMap() { if (!parsed) { parse(); } if (cachedMap != null) { return cachedMap; } // Use LinkedHashMap to provide deterministic order cachedMap = new LinkedHashMap<Object, Object>(); // go through each element of the map for (int i = 0; i < mapSize; i++) { LazyPrimitive<?, ?> lazyKey = uncheckedGetKey(i); if (lazyKey == null) { continue; } Object key = lazyKey.getObject(); // do not overwrite if there are duplicate keys if (key != null && !cachedMap.containsKey(key)) { cachedMap.put(key, uncheckedGetValue(i)); } } return cachedMap; }
/** * Return the map object representing this LazyMap. Note that the keyObjects * will be Writable primitive objects. * * @return the map object */ public Map<Object, Object> getMap() { if (!parsed) { parse(); } if (cachedMap != null) { return cachedMap; } // Use LinkedHashMap to provide deterministic order cachedMap = new LinkedHashMap<Object, Object>(); // go through each element of the map for (int i = 0; i < mapSize; i++) { LazyPrimitive<?, ?> lazyKey = uncheckedGetKey(i); if (lazyKey == null) { continue; } Object key = lazyKey.getObject(); // do not overwrite if there are duplicate keys if (key != null && !cachedMap.containsKey(key)) { cachedMap.put(key, uncheckedGetValue(i)); } } return cachedMap; }
LazyObject lazyValue = uncheckedGetValue(i); Object value = (lazyValue == null ? null : lazyValue.getObject()); cachedMap.put(key, value);
LazyObject v = uncheckedGetValue(i); return v == null ? v : v.getObject();