本文整理汇总了Java中org.apache.commons.collections.iterators.IteratorEnumeration类的典型用法代码示例。如果您正苦于以下问题:Java IteratorEnumeration类的具体用法?Java IteratorEnumeration怎么用?Java IteratorEnumeration使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
IteratorEnumeration类属于org.apache.commons.collections.iterators包,在下文中一共展示了IteratorEnumeration类的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getKeys
import org.apache.commons.collections.iterators.IteratorEnumeration; //导入依赖的package包/类
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;
}
}
示例2: setSqlTypes
import org.apache.commons.collections.iterators.IteratorEnumeration; //导入依赖的package包/类
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);
}
}
示例3: getParameterNames
import org.apache.commons.collections.iterators.IteratorEnumeration; //导入依赖的package包/类
@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());
}
示例4: getKeys
import org.apache.commons.collections.iterators.IteratorEnumeration; //导入依赖的package包/类
public Enumeration getKeys()
{
if (this.cookieMap == null)
{
this.initCookie();
}
return new IteratorEnumeration(this.cookieMap.keySet().iterator());
}
示例5: getResourceBundle
import org.apache.commons.collections.iterators.IteratorEnumeration; //导入依赖的package包/类
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());
}
};
}
示例6: getKeys
import org.apache.commons.collections.iterators.IteratorEnumeration; //导入依赖的package包/类
/**
* {@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());
}
示例7: getAttributeNames
import org.apache.commons.collections.iterators.IteratorEnumeration; //导入依赖的package包/类
@Override
@SuppressWarnings("unchecked")
public Enumeration<String> getAttributeNames() {
return new IteratorEnumeration(attributes.keySet().iterator());
}
示例8: getInitParameterNames
import org.apache.commons.collections.iterators.IteratorEnumeration; //导入依赖的package包/类
@Override
@SuppressWarnings("unchecked")
public Enumeration<String> getInitParameterNames() {
return new IteratorEnumeration( initParameters.keySet().iterator() );
}
示例9: getInitParameterNames
import org.apache.commons.collections.iterators.IteratorEnumeration; //导入依赖的package包/类
@SuppressWarnings("unchecked")
public Enumeration getInitParameterNames() {
return new IteratorEnumeration(params.keySet().iterator());
}
示例10: init
import org.apache.commons.collections.iterators.IteratorEnumeration; //导入依赖的package包/类
/**
* 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();
}
示例11: getHeaders
import org.apache.commons.collections.iterators.IteratorEnumeration; //导入依赖的package包/类
@Override
public Enumeration getHeaders(String headerName) {
return new IteratorEnumeration(headers.values().iterator());
}
示例12: children
import org.apache.commons.collections.iterators.IteratorEnumeration; //导入依赖的package包/类
@Override
public Enumeration children() {
return new IteratorEnumeration(children.iterator());
}
示例13: getAttributeNames
import org.apache.commons.collections.iterators.IteratorEnumeration; //导入依赖的package包/类
@SuppressWarnings("unchecked")
@Override
public Enumeration<String> getAttributeNames() {
return new IteratorEnumeration(this.parameters.keySet().iterator());
}
示例14: getParameterNames
import org.apache.commons.collections.iterators.IteratorEnumeration; //导入依赖的package包/类
@SuppressWarnings("unchecked")
@Override
public Enumeration getParameterNames() {
Iterator<String> paramNamesIt = simpleParams.keySet().iterator();
return new IteratorEnumeration(paramNamesIt);
}