@@ -15,7 +15,7 @@ import { Map } from "./map";
1515 */
1616export class HashMap < K , V > implements Map < K , V > {
1717 private size ! : number ;
18- private buckets ! : HashMapEntry < K , V > [ ] [ ] ;
18+ private buckets ! : MapEntry < K , V > [ ] [ ] ;
1919 private readonly loadFactor = 0.75 ;
2020
2121 constructor ( ) {
@@ -47,7 +47,7 @@ export class HashMap<K, V> implements Map<K, V> {
4747 const bucket = this . buckets [ index ] ;
4848
4949 if ( bucket . length === 0 ) {
50- bucket . push ( new HashMapEntry ( key , value ) ) ;
50+ bucket . push ( new MapEntry ( key , value ) ) ;
5151 this . size ++ ;
5252 return ;
5353 }
@@ -59,7 +59,7 @@ export class HashMap<K, V> implements Map<K, V> {
5959 }
6060 }
6161
62- bucket . push ( new HashMapEntry ( key , value ) ) ;
62+ bucket . push ( new MapEntry ( key , value ) ) ;
6363 this . size ++ ;
6464 }
6565
@@ -164,8 +164,8 @@ export class HashMap<K, V> implements Map<K, V> {
164164 *
165165 * @returns The entries.
166166 */
167- entries ( ) : HashMapEntry < K , V > [ ] {
168- const entries : HashMapEntry < K , V > [ ] = [ ] ;
167+ entries ( ) : MapEntry < K , V > [ ] {
168+ const entries : MapEntry < K , V > [ ] = [ ] ;
169169 for ( const bucket of this . buckets ) {
170170 for ( const entry of bucket ) {
171171 entries . push ( entry ) ;
@@ -228,7 +228,7 @@ export class HashMap<K, V> implements Map<K, V> {
228228 * @param key The key.
229229 * @param value The value.
230230 */
231- export class HashMapEntry < K , V > {
231+ export class MapEntry < K , V > {
232232 key : K ;
233233 value : V ;
234234
0 commit comments