List of usage examples for java.util Collections enumeration
public static <T> Enumeration<T> enumeration(final Collection<T> c)
From source file:org.directwebremoting.util.FakeServletContext.java
public Enumeration<String> getInitParameterNames() { return Collections.enumeration(initParameters.keySet()); }
From source file:gov.nih.nci.caarray.web.fileupload.MonitoredMultiPartRequest.java
/** * {@inheritDoc} */ public Enumeration<String> getFileParameterNames() { return Collections.enumeration(files.keySet()); }
From source file:com.twinsoft.convertigo.beans.core.StepWithExpressions.java
protected void cleanChildren() { if (childrenSteps != null) { //Enumeration e = childrenSteps.elements(); Enumeration<String> e = Collections.enumeration(childrenSteps.keySet()); while (e.hasMoreElements()) { String timeID = (String) e.nextElement(); if (timeID != null) { Long stepPriority = null; Step step = sequence.getCopy(timeID); if (step != null) { stepPriority = new Long(step.priority); step.cleanCopy();/*from w ww . ja v a 2 s .c o m*/ } sequence.removeCopy(timeID, stepPriority); } } childrenSteps.clear(); } }
From source file:com.amazonaws.serverless.proxy.internal.servlet.AwsProxyHttpServletRequest.java
@Override public Enumeration<String> getHeaderNames() { if (request.getHeaders() == null) { return Collections.emptyEnumeration(); }//from w w w. ja va2 s . co m return Collections.enumeration(request.getHeaders().keySet()); }
From source file:org.apache.struts.extras.SecureJakartaStreamMultiPartRequest.java
public Enumeration<String> getFileParameterNames() { return Collections.enumeration(fileInfos.keySet()); }
From source file:io.inkstand.deployment.staticcontent.ZipFileResourceTest.java
@Test public void testList_fileEntry_emptyList() throws Exception { //prepare//from w w w .j av a2 s . co m Enumeration enumeration = Collections.enumeration(Arrays.asList(zipEntry, dirEntry)); when(zipFile.entries()).thenReturn(enumeration); //act List<Resource> resources = subject_file_resource.list(); //assert assertNotNull(resources); assertTrue(resources.isEmpty()); }
From source file:com.jivesoftware.os.routing.bird.deployable.config.extractor.ConfigExtractor.java
static Properties createKeySortedProperties() { return new Properties() { @Override/* ww w .j av a2s . c om*/ public synchronized Enumeration<Object> keys() { return Collections.enumeration(new TreeSet<>(super.keySet())); } }; }
From source file:de.micromata.genome.tpsb.httpmockup.MockHttpServletRequest.java
/** Returns an enumeration with single value of the named header, or an empty enum if no value. */ @Override//from w ww . ja v a2s . c om public Enumeration getHeaders(String name) { String header = getHeader(name); Collection<String> values = new ArrayList<String>(); if (header != null) { values.add(header); } return Collections.enumeration(values); }
From source file:com.bluexml.side.framework.alfresco.shareLanguagePicker.connector.MyHttpRequestServletAdaptator.java
/** * @return/*from w ww .ja v a2 s . c o m*/ * @see javax.servlet.http.HttpServletRequest#getHeaderNames() */ public Enumeration<?> getHeaderNames() { return Collections.enumeration(headers.getKeys()); }
From source file:de.micromata.genome.tpsb.httpmockup.MockHttpServletRequest.java
/** Returns an enumeration containing all the names of headers supplied. */ @Override/*from w ww . j a v a2 s .c o m*/ public Enumeration getHeaderNames() { return Collections.enumeration(headers.keySet()); }