| java.lang.Object | ||
| ↳ | org.apache.commons.collections.keyvalue.AbstractKeyValue | |
| ↳ | org.apache.commons.collections.keyvalue.DefaultKeyValue | |
A mutable KeyValue pair that does not implement
java.util.Map.Entry Map.Entry.
Note that a DefaultKeyValue instance may not contain
itself as a key or value.
|
[Expand]
Inherited Fields | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From class
org.apache.commons.collections.keyvalue.AbstractKeyValue
| |||||||||||
| Public Constructors | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Constructs a new pair with a null key and null value.
| |||||||||||
Constructs a new pair with the specified key and given value.
| |||||||||||
Constructs a new pair from the specified
KeyValue. | |||||||||||
Constructs a new pair from the specified
Map.Entry. | |||||||||||
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Compares this
Map.Entry with another Map.Entry. | |||||||||||
Gets a hashCode compatible with the equals method.
| |||||||||||
Sets the key.
| |||||||||||
Sets the value.
| |||||||||||
Returns a new
Map.Entry object with key and value from this pair. | |||||||||||
|
[Expand]
Inherited Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From class
org.apache.commons.collections.keyvalue.AbstractKeyValue
| |||||||||||
From class
java.lang.Object
| |||||||||||
From interface
org.apache.commons.collections.KeyValue
| |||||||||||
Constructs a new pair with a null key and null value.
Constructs a new pair with the specified key and given value.
| key | the key for the entry, may be null |
|---|---|
| value | the value for the entry, may be null |
Constructs a new pair from the specified KeyValue.
| pair | the pair to copy, must not be null |
|---|
| NullPointerException | if the entry is null |
|---|
Constructs a new pair from the specified Map.Entry.
| entry | the entry to copy, must not be null |
|---|
| NullPointerException | if the entry is null |
|---|
Compares this Map.Entry with another Map.Entry.
Returns true if the compared object is also a DefaultKeyValue,
and its key and value are equal to this object's key and value.
| obj | the object to compare to |
|---|
Gets a hashCode compatible with the equals method.
Implemented per API documentation of hashCode(),
however subclasses may override this.
Sets the key.
| key | the new key |
|---|
| IllegalArgumentException | if key is this object |
|---|
Sets the value.
| value | the new value |
|---|
| IllegalArgumentException | if value is this object |
|---|
Returns a new Map.Entry object with key and value from this pair.