KeyValue pair that does not implement
Map.Entry .
Note that a DefaultKeyValue instance may not contain
itself as a key or value.
| Access | Constructor and Description |
|---|---|
| public | |
| public | DefaultKeyValue(final K
the key for the entry, may be null key, final V the value for the entry, may be null value)Constructs a new pair with the specified key and given value. |
| public | DefaultKeyValue(final KeyValue<? extends K, ? extends V>
the pair to copy, must not be null pair)Constructs a new pair from the specified |
| public | DefaultKeyValue(final Map.
the entry to copy, must not be null entryConstructs a new pair from the specified |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | Returns: true if equal key and valuethe object to compare to obj)Overrides java. Map.Entry with another Map.Entry.
|
| public int | Returns: a suitable hash codeOverrides java. |
| public K | Returns: the old keythe new key key)Overrides org. |
| public V | Returns: the old value of the valuethe new value value)Overrides org. |
| public Map. | Returns: a MapEntry instanceReturns a new |
| DefaultKeyValue | back to summary |
|---|---|
| public DefaultKeyValue() Constructs a new pair with a null key and null value. | |
| DefaultKeyValue | back to summary |
|---|---|
| public DefaultKeyValue(final K key, final V value) Constructs a new pair with the specified key and given value.
| |
| DefaultKeyValue | back to summary |
|---|---|
| public DefaultKeyValue(final KeyValue<? extends K, ? extends V> pair) Constructs a new pair from the specified
| |
| DefaultKeyValue | back to summary |
|---|---|
| public DefaultKeyValue(final Map. Constructs a new pair from the specified
| |
| equals | back to summary |
|---|---|
| public boolean equals(final Object obj) Overrides java. Compares this
Returns true if the compared object is also a | |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Gets a hashCode compatible with the equals method.
Implemented per API documentation of
| |
| setKey | back to summary |
|---|---|
| public K setKey(final K key) Overrides org. Sets the key.
| |
| setValue | back to summary |
|---|---|
| public V setValue(final V value) Overrides org. Sets the value.
| |
| toMapEntry | back to summary |
|---|---|
| public Map. Returns a new | |