1 |
alfonx |
420 |
package skrueger.geotools; |
2 |
|
|
|
3 |
|
|
import java.util.TreeMap; |
4 |
|
|
|
5 |
|
|
import skrueger.AttributeMetaData; |
6 |
|
|
|
7 |
|
|
/** |
8 |
|
|
* An extension of TreeMap, that is clonable in the sense of |
9 |
|
|
* |
10 |
|
|
* @author stefan |
11 |
|
|
* |
12 |
|
|
*/ |
13 |
|
|
public class AttributeMetadataMap extends TreeMap<Integer, AttributeMetaData> |
14 |
|
|
implements Copyable<AttributeMetadataMap> { |
15 |
|
|
|
16 |
|
|
public AttributeMetadataMap() { |
17 |
|
|
} |
18 |
|
|
|
19 |
|
|
@Override |
20 |
|
|
public AttributeMetadataMap copyTo(AttributeMetadataMap amdMap) { |
21 |
|
|
|
22 |
|
|
amdMap.clear(); |
23 |
|
|
|
24 |
|
|
for (Integer key : keySet()) { |
25 |
|
|
AttributeMetaData attributeMetaData = get(key); |
26 |
|
|
amdMap.put(key, attributeMetaData.copy()); |
27 |
|
|
} |
28 |
|
|
return amdMap; |
29 |
|
|
} |
30 |
|
|
|
31 |
|
|
@Override |
32 |
|
|
public AttributeMetadataMap copy() { |
33 |
|
|
AttributeMetadataMap copy = new AttributeMetadataMap(); |
34 |
|
|
return copyTo(copy); |
35 |
|
|
} |
36 |
|
|
} |