@@ -106,10 +106,12 @@ namespace Java {
106106
107107 public:
108108 /* *
109- * Compares the specified object
109+ * Compares the anotherHashMap
110110 * with this map for equality.
111111 *
112- * @param object
112+ * @param anotherHashMap
113+ * @return true if equal
114+ * false if not equal
113115 */
114116 boolean equals (const HashMap<Key, Value> &anotherHashMap) {
115117
@@ -133,13 +135,13 @@ namespace Java {
133135 *
134136 * @param action
135137 */
136- void forEach (BiConsumer<void (Key, Value)> action) {
137- for (auto &element : this ->original ) {
138- Key key = element.first ;
139- Value value = element.second ;
140- action (key, value);
141- }
142- }
138+ // void forEach(BiConsumer<void(Key, Value)> action) {
139+ // for (auto &element : this->original) {
140+ // Key key = element.first;
141+ // Value value = element.second;
142+ // action(key, value);
143+ // }
144+ // }
143145
144146 // TODO(thoangminh): We will support this method later
145147 /* *
@@ -151,10 +153,10 @@ namespace Java {
151153 * Object.
152154 *
153155 * This implementation iterates over entrySet(), calling
154- * { Map.Entry hashCode()} on each element (entry) in the
156+ * Map.Entry hashCode() on each element (entry) in the
155157 * set, and adding up the results.
156158 *
157- * @return the hash code value for this map
159+ * @return int the hash code value for this map
158160 */
159161 int hashCode ();
160162
@@ -415,8 +417,7 @@ namespace Java {
415417 /* *
416418 * Set of hash map entries
417419 *
418- * Returns a Set view of the mappings contained in this map.
419- * @return Set<Map.Entry<Key,Value>> - a set view of the mappings contained in this map
420+ * @return a set view of the mappings contained in this map
420421 */
421422 Set<class Map <Key, Value>::Entry> entrySet () {
422423 Set<class Map <Key, Value>::Entry> entrySet;
@@ -431,12 +432,12 @@ namespace Java {
431432
432433 /* *
433434 * Returns the value to which the specified key is mapped,
434- * or null if this map contains no mapping for the key
435+ * or default if this map contains no mapping for the key
435436 *
436437 * @param key the key whose associated value is to be returned
437438 *
438439 * @return Value value the value to which the specified key is mapped,
439- * or null if no mapping with key
440+ * or default if no mapping with key
440441 */
441442 Value get (const Key &key) const {
442443 Value result;
0 commit comments