A pair containing a key and an associated value called
the item. Used primarily to represent the elements of
a Map
. The type Entry<Key,Item>
may be abbreviated
Key->Item
. An instance of Entry
may be constructed
using the ->
operator:
String->Person entry = person.name->person;
Initializer |
Entry(Key key, Item item) Parameters:
|
Attributes | |
hash | shared actual Integer hash The hash value of the value, which allows the value
to be an element of a hash-based set or key of a
hash-based map. Implementations must respect the
constraint that if Refined declaration: hash |
item | Source Code shared Item item The value associated with the key. |
key | Source Code shared Key key The key used to access the entry. |
pair | Source Code A pair (2 element tuple) with the key and item of this entry. |
string | Source Code shared actual String string Returns a description of the entry in the form
Refined declaration: string |
Methods | |
equals | Source Code Determines if this entry is equal to the given entry. Two entries are equal if they have the same key and the same value. Refined declaration: equals |