Class Entry<Key,Value>
java.lang.Object
com.iu.javadatastructureslab.datastructures.Entry<Key,Value>
- Type Parameters:
Key- key typeValue- value type
Represents a key/value pair stored in ArrayMap.
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
Entry
Creates a new entry with the given key and value.- Parameters:
key- entry keyvalue- entry value
-
-
Method Details
-
setValue
Updates the value for this entry.- Parameters:
value- new value
-
setKey
Updates the key for this entry.- Parameters:
key- new key
-
getKey
Returns the entry key.- Returns:
- key value
-
getValue
Returns the entry value.- Returns:
- entry value
-
toString
Returns a string representation of the entry.
-