If you mean asymptotic time complexity, then:
since it HashMapuses hashCodeto calculate which bucket to use in the hash table, if you return 1from hashCode, you actually make your HashMapperformance metric as (unsorted) LinkedList.
HashMap, equal hashCode s.
Wikipedia:
+
| | Insert | Delete | Search | Space Usage |
+
| Unsorted linked list | O(1)* | O(1)* | O(n) | O(n) |
| Hash table | O(1) | O(1) | O(1) | O(n) |
+
, , :
HashMap ( O(1) O(n))HashMap ( )