blob: a68dcbe4d3aad64f585c40936c68d0facf36fa6a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
|
/**
*
*/
package net.pacien.util;
import java.util.HashMap;
import java.util.Map;
/**
* @author pacien
*
*/
public class IntrinsicMap<K, V extends Mappable> extends HashMap<K, V> {
/**
*
*/
private static final long serialVersionUID = 1L;
/**
*
*/
public IntrinsicMap() {
super();
}
/**
* @param initialCapacity
*/
public IntrinsicMap(int initialCapacity) {
super(initialCapacity);
}
/**
* @param m
*/
public IntrinsicMap(Map<? extends K, ? extends V> m) {
super(m);
}
/**
* @param initialCapacity
* @param loadFactor
*/
public IntrinsicMap(int initialCapacity, float loadFactor) {
super(initialCapacity, loadFactor);
}
@SuppressWarnings("unchecked")
public V put(V value) {
return super.put((K) value.getKey(), value);
}
@Override
public V put(K key, V value) {
return this.put(value);
}
}
|