Package dev.tylermong.customhashmap
Class Entry<K,V>
java.lang.Object
dev.tylermong.customhashmap.Entry<K,V>
- Type Parameters:
K- the type of the keyV- the type of the value
This class represents an entry in the custom hash map. It uses generics to allow for any type of key and value.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
key
The key of the entry, which can be of any type. -
value
The value of the entry, which can be of any type.
-
-
Constructor Details
-
Entry
Constructs an entry with the specified key and value.- Parameters:
key- the key of the entryvalue- the value of the entry
-
-
Method Details
-
getKey
Returns the key of the entry.- Returns:
- the key of the entry
-
getValue
Returns the value of the entry.- Returns:
- the value of the entry
-
setValue
Sets the value of the entry.- Parameters:
value- the value to set
-