1 package org.tinyjee.maven.dim.extensions;
2
3 import com.thoughtworks.qdox.model.*;
4 import org.tinyjee.maven.dim.utils.AbstractSelectableJavaEntitiesList;
5
6 import java.util.Collection;
7 import java.util.Map;
8
9
10
11
12
13
14 public class SelectableMappedJavaEntitiesList extends AbstractSelectableJavaEntitiesList<Map<?, ?>> {
15
16 private static final long serialVersionUID = -1483709242125352523L;
17
18 private final String qdoxEntityKey;
19
20 public SelectableMappedJavaEntitiesList(Collection<? extends Map<?, ?>> maps, String qdoxEntityKey) {
21 super(maps);
22 this.qdoxEntityKey = qdoxEntityKey;
23 }
24
25 public SelectableMappedJavaEntitiesList(String qdoxEntityKey) {
26 this.qdoxEntityKey = qdoxEntityKey;
27 }
28
29 @Override
30 protected Object unwrap(Map<?, ?> element) {
31 return element.get(qdoxEntityKey);
32 }
33
34 @Override
35 @SuppressWarnings("unchecked")
36 public SelectableMappedJavaEntitiesList clone() {
37 return (SelectableMappedJavaEntitiesList) super.clone();
38 }
39 }