MCPcopy Create free account
hub / github.com/codenameone/CodenameOne / AbstractMap

Class AbstractMap

Ports/CLDC11/src/java/util/AbstractMap.java:28–708  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

26///
27/// 1.2
28public abstract class AbstractMap<K, V> implements Map<K, V> {
29
30 // Lazily initialized key set.
31 Set<K> keySet;
32
33 Collection<V> valuesCollection;
34
35 /// An immutable key-value mapping.
36 ///
37 /// Type parameter `K`: the type of key
38 /// Type parameter `V`: the type of value
39 ///
40 /// #### Since
41 ///
42 /// 1.6
43 public static class SimpleImmutableEntry<K, V> implements Map.Entry<K, V> {
44
45 private static final long serialVersionUID = 7138329143949025153L;
46
47 private K key;
48
49 private V value;
50
51 /// Constructs a new instance by key and value.
52 ///
53 /// #### Parameters
54 ///
55 /// - `theKey`: the key
56 ///
57 /// - `theValue`: the value
58 public SimpleImmutableEntry(K theKey, V theValue) {
59 key = theKey;
60 value = theValue;
61 }
62
63 /// Constructs a new instance by an entry
64 ///
65 /// #### Parameters
66 ///
67 /// - `entry`: the entry
68 public SimpleImmutableEntry(Map.Entry<? extends K, ? extends V> entry) {
69 key = entry.getKey();
70 value = entry.getValue();
71 }
72
73 /// {@inheritDoc}
74 ///
75 /// #### See also
76 ///
77 /// - java.util.Map.Entry#getKey()
78 public K getKey() {
79 return key;
80 }
81
82 /// {@inheritDoc}
83 ///
84 /// #### See also
85 ///

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected