java源码-java.util.List


public List findAddressesByApplication(String application) {
    List ret = new ArrayList();
    ConcurrentMap> consumerUrls = getRegistryCache().get(Constants.CONSUMERS_CATEGORY);
    if(consumerUrls == null) return ret;

    for(Map.Entry> e1 : consumerUrls.entrySet()) {
        Map value = e1.getValue();
        for(Map.Entry e2 : value.entrySet()) {
            URL u = e2.getValue();
            if(application.equals(u.getParameter(Constants.APPLICATION_KEY))) {
                String addr = u.getAddress();
                if(addr != null) ret.add(addr);
            }
        }
    }

    return ret;
}


原文:http://www.codingdict.com/sources/java/java.util/5364.html

你可能感兴趣的:(java源码-java.util.List)