当前位置: 首页>>代码示例>>Java>>正文


Java Collections.emptyEnumeration方法代码示例

本文整理汇总了Java中java.util.Collections.emptyEnumeration方法的典型用法代码示例。如果您正苦于以下问题:Java Collections.emptyEnumeration方法的具体用法?Java Collections.emptyEnumeration怎么用?Java Collections.emptyEnumeration使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在java.util.Collections的用法示例。


在下文中一共展示了Collections.emptyEnumeration方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getHeaders

import java.util.Collections; //导入方法依赖的package包/类
@Override
public Enumeration<String> getHeaders(String name) {
  List<String> headerValues = httpHeaders.get(name);
  if (headerValues == null || headerValues.isEmpty()) {
    return Collections.emptyEnumeration();
  }

  return Collections.enumeration(headerValues);
}
 
开发者ID:apache,项目名称:incubator-servicecomb-java-chassis,代码行数:10,代码来源:CommonToHttpServletRequest.java

示例2: findResources

import java.util.Collections; //导入方法依赖的package包/类
@Override
public Enumeration<URL> findResources(String name) throws IOException {
    Enumeration<URL> origResources = getParent().getResources(name);
    Enumeration<URL> deleResources = oldDelegate != null ? oldDelegate.findResources(name) : Collections.<URL>emptyEnumeration();
    
    return new CompoundEnumeration<URL>(new Enumeration[] {
            origResources,
            deleResources,
            super.findResources(name)
    });
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:12,代码来源:NbRemoteLoader.java

示例3: attributes

import java.util.Collections; //导入方法依赖的package包/类
@Override
public Enumeration<String> attributes(String name) {
    Item item = getItem(name);
    if (item != null) {
        return item.getAttributes();
    } else {
        return Collections.emptyEnumeration();
    }
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:10,代码来源:SourceFS.java

示例4: children

import java.util.Collections; //导入方法依赖的package包/类
public Enumeration<CCTNode> children() {
    final CCTNode[] _children = getChildren();
    final int _childrenCount = _children == null ? 0 : _children.length;
    
    if (_childrenCount == 0) return Collections.emptyEnumeration();
    
    return new Enumeration<CCTNode>() {
        private int index = 0;
        public boolean hasMoreElements() { return index < _childrenCount; }
        public CCTNode nextElement()     { return _children[index++]; }
    };
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:13,代码来源:CCTNode.java

示例5: findResourcesOnClassPath

import java.util.Collections; //导入方法依赖的package包/类
/**
 * Returns the URLs of all resources of the given name on the class path.
 */
private Enumeration<URL> findResourcesOnClassPath(String name) {
    if (hasClassPath()) {
        if (System.getSecurityManager() == null) {
            return ucp.findResources(name, false);
        } else {
            PrivilegedAction<Enumeration<URL>> pa;
            pa = () -> ucp.findResources(name, false);
            return AccessController.doPrivileged(pa);
        }
    } else {
        // no class path
        return Collections.emptyEnumeration();
    }
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:18,代码来源:BuiltinClassLoader.java

示例6: getEnumeration

import java.util.Collections; //导入方法依赖的package包/类
@Override
public Enumeration<?> getEnumeration() throws JMSException {
    checkClosed();
    return Collections.emptyEnumeration();
}
 
开发者ID:messaginghub,项目名称:pooled-jms,代码行数:6,代码来源:MockJMSQueueBrowser.java

示例7: getInitParameterNames

import java.util.Collections; //导入方法依赖的package包/类
@Override
public Enumeration<String> getInitParameterNames() {
    return Collections.emptyEnumeration();
}
 
开发者ID:geeker-lait,项目名称:tasfe-framework,代码行数:5,代码来源:AbstractNettyRegistration.java

示例8: getAttributeNames

import java.util.Collections; //导入方法依赖的package包/类
public Enumeration getAttributeNames() {
    return Collections.emptyEnumeration();
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:4,代码来源:SimpleAttributeSet.java

示例9: getAttributeNames

import java.util.Collections; //导入方法依赖的package包/类
public Enumeration<?> getAttributeNames() {
    return Collections.emptyEnumeration();
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:4,代码来源:SimpleAttributeSet.java

示例10: getKeys

import java.util.Collections; //导入方法依赖的package包/类
@Override
public Enumeration<String> getKeys() {
    return Collections.emptyEnumeration();
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:5,代码来源:LoggerFinderAPI.java

示例11: findResources

import java.util.Collections; //导入方法依赖的package包/类
/**
 * Returns an enumeration of {@link java.net.URL URL} objects
 * representing all the resources with the given name. Class loader
 * implementations should override this method.
 *
 * <p> For resources in named modules then the method must implement the
 * rules for encapsulation specified in the {@code Module} {@link
 * Module#getResourceAsStream getResourceAsStream} method. Additionally,
 * it must not find non-"{@code .class}" resources in packages of named
 * modules unless the package is {@link Module#isOpen(String) opened}
 * unconditionally. </p>
 *
 * @implSpec The default implementation returns an enumeration that
 * contains no elements.
 *
 * @param  name
 *         The resource name
 *
 * @return  An enumeration of {@link java.net.URL URL} objects for
 *          the resource. If no resources could  be found, the enumeration
 *          will be empty. Resources for which a {@code URL} cannot be
 *          constructed, are in a package that is not opened unconditionally,
 *          or access to the resource is denied by the security manager,
 *          are not returned in the enumeration.
 *
 * @throws  IOException
 *          If I/O errors occur
 *
 * @since  1.2
 * @revised 9
 * @spec JPMS
 */
protected Enumeration<URL> findResources(String name) throws IOException {
    return Collections.emptyEnumeration();
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:36,代码来源:ClassLoader.java


注:本文中的java.util.Collections.emptyEnumeration方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。