Example usage for java.util Collections enumeration

List of usage examples for java.util Collections enumeration

Introduction

In this page you can find the example usage for java.util Collections enumeration.

Prototype

public static <T> Enumeration<T> enumeration(final Collection<T> c) 

Source Link

Document

Returns an enumeration over the specified collection.

Usage

From source file:org.opennms.netmgt.config.snmp.Definition.java

/**
 * Method enumerateRange.//from ww  w. j av  a  2  s.co m
 * 
 * @return an Enumeration over all possible elements of this
 * collection
 */
public Enumeration<Range> enumerateRange() {
    return Collections.enumeration(this._rangeList);
}

From source file:org.apache.click.ClickRequestWrapper.java

/**
 * @see javax.servlet.ServletRequest#getParameterNames()
 *//* w w  w  .j av a 2  s.co m*/
@Override
@SuppressWarnings("unchecked")
public Enumeration getParameterNames() {
    if (isMultipartRequest) {
        return Collections.enumeration(getMultipartParameterMap().keySet());

    } else {
        return request.getParameterNames();
    }
}

From source file:nl.armatiek.xslweb.web.servlet.XSLWebHttpServletRequest.java

@Override
public Enumeration<Locale> getLocales() {
    ArrayList<Locale> list = new ArrayList<Locale>();
    list.add(getLocale());//from  www  .  ja  v  a 2  s .c om
    return Collections.enumeration(list);
}

From source file:com.github.achatain.nopasswordauthentication.utils.FakeHttpServletRequest.java

public Enumeration<String> getHeaderNames() {
    return Collections.enumeration(this.headers.keySet());
}

From source file:io.wcm.caravan.io.http.impl.servletclient.HttpServletRequestMapper.java

@Override
public Enumeration<Locale> getLocales() {
    return Collections.enumeration(Collections.singletonList(getLocale()));
}

From source file:eu.planets_project.tb.gui.backing.ListExp.java

public Collection<Experiment> getAllExpApproved() {
    TestbedManager testbedMan = (TestbedManager) JSFUtil.getManagedObject("TestbedManager");
    Collection<Experiment> allExps = testbedMan
            .getAllExperimentsAtPhase(ExperimentPhase.PHASE_EXPERIMENTEXECUTION);
    currExps = Collections.list(Collections.enumeration(allExps));
    sort(getSort(), isAscending());/*from  w ww .  j  a va  2s .c o  m*/
    return currExps;
}

From source file:bijian.util.upload.MyMultiPartRequest.java

public Enumeration<String> getFileParameterNames() {
    return Collections.enumeration(files.keySet());
}

From source file:net.ontopia.utils.ontojsp.FakeServletContext.java

@Override
public Enumeration<String> getInitParameterNames() {
    return Collections.enumeration(initParams.keySet());
}

From source file:com.github.achatain.nopasswordauthentication.utils.FakeHttpServletRequest.java

public Enumeration<String> getHeaders(String name) {
    return Collections.enumeration(this.headers.get(name));
}

From source file:com.u2apple.tool.dao.DeviceI18nDaoImpl.java

private void storeProperties(Properties properties, String fileKey) throws FileNotFoundException, IOException {
    Properties tempProperties = new Properties() {
        @Override/*  w  ww.  j  a va 2 s .co  m*/
        public synchronized Enumeration<Object> keys() {
            return Collections.enumeration(new TreeSet<Object>(super.keySet()));
        }
    };
    tempProperties.putAll(properties);
    String file = Configuration.getProperty(fileKey);
    tempProperties.store(new FileOutputStream(file), null);
}