/** * Creates a new hash map with the same contents as this map. */ private HashMap<Object, Object> toHashMap() { HashMap<Object, Object> result = new HashMap<Object, Object>(size()); for (int i = 0; i < elements.length; i = i + 2) { if (elements[i] != null) { result.put(elements[i], elements[i + 1]); } } return result; }
/** * Creates a new hash map with the same contents as this map. */ private HashMap toHashMap() { HashMap result = new HashMap(size()); for (int i = 0; i < elements.length; i = i + 2) { if (elements[i] != null) { result.put(elements[i], elements[i + 1]); } } return result; }
/** * Creates a new hash map with the same contents as this map. */ private HashMap toHashMap() { HashMap result = new HashMap(size()); for (int i = 0; i < elements.length; i = i + 2) { if (elements[i] != null) { result.put(elements[i], elements[i + 1]); } } return result; }
/** * Creates a new hash map with the same contents as this map. */ private HashMap<Object, Object> toHashMap() { HashMap<Object, Object> result = new HashMap<>(size()); for (int i = 0; i < elements.length; i = i + 2) { if (elements[i] != null) { result.put(elements[i], elements[i + 1]); } } return result; }
/** * @see Map#keySet() * * Note: This implementation does not conform properly to the * specification in the Map interface. The returned collection will not * be bound to this map and will not remain in sync with this map. */ @Override public Set keySet() { Set<Object> result = new HashSet<Object>(size()); for (int i = 0; i < elements.length; i = i + 2) { if (elements[i] != null) { result.add(elements[i]); } } return result; }
/** * @see Map#values() * * Note: This implementation does not conform properly to the * specification in the Map interface. The returned collection will not * be bound to this map and will not remain in sync with this map. */ @Override public Collection values() { Set<Object> result = new HashSet<>(size()); for (int i = 1; i < elements.length; i = i + 2) { if (elements[i] != null) { result.add(elements[i]); } } return result; } }
/** * @see Map#keySet() * * Note: This implementation does not conform properly to the * specification in the Map interface. The returned collection will not * be bound to this map and will not remain in sync with this map. */ public Set keySet() { Set result = new HashSet(size()); for (int i = 0; i < elements.length; i = i + 2) { if (elements[i] != null) { result.add(elements[i]); } } return result; }
/** * @see Map#keySet() * * Note: This implementation does not conform properly to the * specification in the Map interface. The returned collection will not * be bound to this map and will not remain in sync with this map. */ public Set keySet() { Set result = new HashSet(size()); for (int i = 0; i < elements.length; i = i + 2) { if (elements[i] != null) { result.add(elements[i]); } } return result; }
/** * @see Map#values() * * Note: This implementation does not conform properly to the * specification in the Map interface. The returned collection will not * be bound to this map and will not remain in sync with this map. */ @Override public Collection values() { Set<Object> result = new HashSet<Object>(size()); for (int i = 1; i < elements.length; i = i + 2) { if (elements[i] != null) { result.add(elements[i]); } } return result; } }
/** * @see Map#values() * * Note: This implementation does not conform properly to the * specification in the Map interface. The returned collection will not * be bound to this map and will not remain in sync with this map. */ public Collection values() { Set result = new HashSet(size()); for (int i = 1; i < elements.length; i = i + 2) { if (elements[i] != null) { result.add(elements[i]); } } return result; } }
/** * @see Map#keySet() * * Note: This implementation does not conform properly to the * specification in the Map interface. The returned collection will not * be bound to this map and will not remain in sync with this map. */ @Override public Set keySet() { Set<Object> result = new HashSet<>(size()); for (int i = 0; i < elements.length; i = i + 2) { if (elements[i] != null) { result.add(elements[i]); } } return result; }
/** * @see Map#values() * * Note: This implementation does not conform properly to the * specification in the Map interface. The returned collection will not * be bound to this map and will not remain in sync with this map. */ public Collection values() { Set result = new HashSet(size()); for (int i = 1; i < elements.length; i = i + 2) { if (elements[i] != null) { result.add(elements[i]); } } return result; } }