Java 类org.apache.commons.collections.iterators.IteratorEnumeration 实例源码

项目:eterna    文件:ResultRowContainer.java   
public Enumeration getKeys()
{
    try
    {
        ResultMetaData rmd = this.row.getResultIterator().getMetaData();
        int count = rmd.getColumnCount();
        List names = new ArrayList(rmd.getColumnCount());
        for (int i = 1; i <= count; i++)
        {
            names.add(rmd.getColumnReader(i).getName());
        }
        return new IteratorEnumeration(names.iterator());
    }
    catch (SQLException ex)
    {
        return null;
    }
}
项目:openhab1-addons    文件:JdbcConfiguration.java   
private void setSqlTypes() {

        @SuppressWarnings("unchecked")
        Enumeration<String> keys = new IteratorEnumeration(configuration.keySet().iterator());

        while (keys.hasMoreElements()) {
            String key = keys.nextElement();
            Matcher matcher = EXTRACT_CONFIG_PATTERN.matcher(key);
            if (!matcher.matches()) {
                continue;
            }
            matcher.reset();
            matcher.find();
            if (!matcher.group(1).equals("sqltype")) {
                continue;
            }
            String itemType = matcher.group(2).toUpperCase() + "ITEM";
            String value = (String) configuration.get(key);
            logger.debug("JDBC::updateConfig: set sqlTypes: itemType={} value={}", itemType, value);
            dBDAO.sqlTypes.put(itemType, value);
        }
    }
项目:OpenUnison    文件:ProxyRequest.java   
@Override
public Enumeration getParameterNames() {

    HashSet<String> paramListLocal = new HashSet<String>();
    paramListLocal.addAll(this.paramList);

    for (NVP p : this.queryString) {
        if (! paramListLocal.contains(p.getName())) {
            paramListLocal.add(p.getName());
        }
    }

        return new IteratorEnumeration(paramListLocal.iterator());

}
项目:eterna    文件:CookieContainer.java   
public Enumeration getKeys()
{
    if (this.cookieMap == null)
    {
        this.initCookie();
    }
    return new IteratorEnumeration(this.cookieMap.keySet().iterator());
}
项目:imcms    文件:ImcmsPrefsLocalizedMessageProvider.java   
public ResourceBundle getResourceBundle(String languageIso639_2) {
    String propertiesFilename = "WEB-INF/conf/imcms_" + languageIso639_2 + ".properties";
    final Properties languageProperties = PropertyManager.getPropertiesFrom(propertiesFilename);
    return new ResourceBundle() {
        protected Object handleGetObject(String key) {
            return languageProperties.getProperty(key);
        }

        public Enumeration<String> getKeys() {
            return new IteratorEnumeration(languageProperties.keySet().iterator());
        }
    };
}
项目:sinavi-jfw    文件:InternalMessages.java   
/**
 * {@inheritDoc}
 */
@SuppressWarnings("unchecked")
@Override
public synchronized Enumeration<String> getKeys() {
    HashSet<String> set = new HashSet<String>(INITIAL_CAPACITY);

    addAllElements(set, messageBundle.getKeys());
    if (parent != null) {
        addAllElements(set, parent.getKeys());
    }
    return new IteratorEnumeration(set.iterator());
}
项目:OpenCyclos    文件:ResettableAttributeHolder.java   
@Override
@SuppressWarnings("unchecked")
public Enumeration<String> getAttributeNames() {
    return new IteratorEnumeration(attributes.keySet().iterator());
}
项目:kc-rice    文件:KualiActionServlet.java   
@Override
@SuppressWarnings("unchecked")
public Enumeration<String> getInitParameterNames() {
          return new IteratorEnumeration( initParameters.keySet().iterator() );
      }
项目:openmrs-module-legacyui    文件:OpenmrsDWRServlet.java   
@SuppressWarnings("unchecked")
public Enumeration getInitParameterNames() {
    return new IteratorEnumeration(params.keySet().iterator());
}
项目:incubator-atlas    文件:AtlasAuthenticationFilter.java   
/**
 * Initialize the filter.
 *
 * @param filterConfig filter configuration.
 * @throws ServletException thrown if the filter could not be initialized.
 */
@Override
public void init(FilterConfig filterConfig) throws ServletException {
    LOG.info("AtlasAuthenticationFilter initialization started");
    final FilterConfig globalConf = filterConfig;
    final Map<String, String> params = new HashMap<>();
    try {
        configuration = ApplicationProperties.get();
    } catch (Exception e) {
        throw new ServletException(e);
    }

    if (configuration != null) {
        headerProperties = ConfigurationConverter.getProperties(configuration.subset("atlas.headers"));
    }

    FilterConfig filterConfig1 = new FilterConfig() {
        @Override
        public ServletContext getServletContext() {
            if (globalConf != null) {
                return globalConf.getServletContext();
            } else {
                return nullContext;
            }
        }

        @SuppressWarnings("unchecked")
        @Override
        public Enumeration<String> getInitParameterNames() {
            return new IteratorEnumeration(params.keySet().iterator());
        }

        @Override
        public String getInitParameter(String param) {
            return params.get(param);
        }

        @Override
        public String getFilterName() {
            return "AtlasAuthenticationFilter";
        }
    };

    super.init(filterConfig1);

    optionsServlet = new HttpServlet() {
    };
    optionsServlet.init();
}
项目:artifactory    文件:InternalArtifactoryRequest.java   
@Override
public Enumeration getHeaders(String headerName) {
    return new IteratorEnumeration(headers.values().iterator());
}
项目:artifactory    文件:MenuNode.java   
@Override
public Enumeration children() {
    return new IteratorEnumeration(children.iterator());
}
项目:jresplus    文件:PipelineRequestWrapper.java   
@SuppressWarnings("unchecked")
@Override
public Enumeration<String> getAttributeNames() {
    return new IteratorEnumeration(this.parameters.keySet().iterator());
}
项目:rice    文件:KualiActionServlet.java   
@Override
@SuppressWarnings("unchecked")
public Enumeration<String> getInitParameterNames() {
          return new IteratorEnumeration( initParameters.keySet().iterator() );
      }
项目:open-cyclos    文件:ResettableAttributeHolder.java   
@Override
@SuppressWarnings("unchecked")
public Enumeration<String> getAttributeNames() {
    return new IteratorEnumeration(attributes.keySet().iterator());
}
项目:kuali_rice    文件:KualiActionServlet.java   
@Override
@SuppressWarnings("unchecked")
public Enumeration<String> getInitParameterNames() {
          return new IteratorEnumeration( initParameters.keySet().iterator() );
      }
项目:Jouve-Project    文件:SimpleParamsHttpServletRequestWrapper.java   
@SuppressWarnings("unchecked")
@Override
public Enumeration getParameterNames() {
    Iterator<String> paramNamesIt = simpleParams.keySet().iterator();
    return new IteratorEnumeration(paramNamesIt);
}