Javolution 6.0.0 java
sorted/MapEntryImpl.java
Go to the documentation of this file.
1
/*
2
* Javolution - Java(TM) Solution for Real-Time and Embedded Systems
3
* Copyright (C) 2012 - Javolution (http://javolution.org/)
4
* All rights reserved.
5
*
6
* Permission to use, copy, modify, and distribute this software is
7
* freely granted, provided that this notice is preserved.
8
*/
9
package
javolution.util.internal.map.sorted;
10
11
import
java.io.Serializable;
12
import
java.util.Map;
13
17
public
final
class
MapEntryImpl
<K, V>
implements
Map.Entry<K, V>, Serializable {
18
19
private
static
final
long
serialVersionUID
= 0x600L;
// Version.
20
K
key
;
21
V
value
;
22
23
public
MapEntryImpl
(K
key
, V
value
) {
24
this.key =
key
;
25
this.value =
value
;
26
}
27
28
@Override
29
public
K
getKey
() {
30
return
key
;
31
}
32
33
@Override
34
public
V
getValue
() {
35
return
value
;
36
}
37
38
@Override
39
public
V
setValue
(V
value
) {
40
V oldValue = this.
value
;
41
this.value =
value
;
42
return
oldValue;
43
}
44
45
@Override
46
public
String
toString
() {
47
return
key
+
"="
+
value
;
48
}
49
50
}
javolution.util.internal.map.sorted.MapEntryImpl
Definition:
sorted/MapEntryImpl.java:17
javolution.util.internal.map.sorted.MapEntryImpl.setValue
V setValue(V value)
Definition:
sorted/MapEntryImpl.java:39
javolution.util.internal.map.sorted.MapEntryImpl.toString
String toString()
Definition:
sorted/MapEntryImpl.java:46
javolution.util.internal.map.sorted.MapEntryImpl.getKey
K getKey()
Definition:
sorted/MapEntryImpl.java:29
javolution.util.internal.map.sorted.MapEntryImpl.value
V value
Definition:
sorted/MapEntryImpl.java:21
javolution.util.internal.map.sorted.MapEntryImpl.getValue
V getValue()
Definition:
sorted/MapEntryImpl.java:34
javolution.util.internal.map.sorted.MapEntryImpl.serialVersionUID
static final long serialVersionUID
Definition:
sorted/MapEntryImpl.java:19
javolution.util.internal.map.sorted.MapEntryImpl.MapEntryImpl
MapEntryImpl(K key, V value)
Definition:
sorted/MapEntryImpl.java:23
javolution.util.internal.map.sorted.MapEntryImpl.key
K key
Definition:
sorted/MapEntryImpl.java:20
core-java
src
main
java
javolution
util
internal
map
sorted
MapEntryImpl.java
Generated by
1.8.18