Subversion Repositories XServices

Rev

Rev 82 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 82 Rev 181
Line 16... Line 16...
16
package net.brutex.xservices.types.ant;
16
package net.brutex.xservices.types.ant;
Line 17... Line 17...
17
 
17
 
18
import java.util.ArrayList;
18
import java.util.ArrayList;
19
import java.util.List;
19
import java.util.List;
-
 
20
import java.util.Map;
20
import java.util.Map;
21
 
21
import javax.xml.bind.annotation.XmlElement;
22
import javax.xml.bind.annotation.XmlElement;
Line 22... Line 23...
22
import javax.xml.bind.annotation.XmlRootElement;
23
import javax.xml.bind.annotation.XmlRootElement;
23
 
24
 
Line 42... Line 43...
42
    public String value="";
43
    public String value="";
Line 43... Line 44...
43
 
44
 
44
    /**
45
    /**
45
     * Converts a Map<String, String> into a list of
46
     * Converts a Map<String, String> into a list of
46
     * AntProperties.
47
     * AntProperties.
47
     * @param map   The map to convert
48
     * @param newMap   The map to convert
48
     * @return      A list of key/value pairs
49
     * @return      A list of key/value pairs
49
     */
50
     */
50
    public static List<AntProperty> createAntPropertyList(Map<String, String> map) {
51
    public static List<AntProperty> createAntPropertyList(Map<String, Object> newMap) {
51
        List<AntProperty> list = new ArrayList<AntProperty>();
52
        List<AntProperty> list = new ArrayList<AntProperty>();
52
        for(Map.Entry<String, String> e : map.entrySet()) {
53
        for(Map.Entry<String, Object> e : newMap.entrySet()) {
53
            list.add(new AntProperty(e.getKey(), e.getValue()));
54
            list.add(new AntProperty(e.getKey(), (String)e.getValue()));
54
        }
55
        }
55
        return list;
56
        return list;
Line 56... Line 57...
56
    }
57
    }