List of usage examples for java.util Collections enumeration
public static <T> Enumeration<T> enumeration(final Collection<T> c)
From source file:com.thoughtworks.go.http.mocks.MockServletContext.java
@Override @Deprecated public Enumeration<String> getServletNames() { return Collections.enumeration(Collections.emptySet()); }
From source file:org.apache.shindig.common.testing.FakeHttpServletRequest.java
public Enumeration<?> getHeaders(String name) { List<String> values = Lists.newArrayList(); for (Map.Entry<String, String> entry : headers.entrySet()) { if (name.equalsIgnoreCase(entry.getKey())) { values.add(entry.getValue()); }/*from w ww .ja va2 s. c o m*/ } return Collections.enumeration(values); }
From source file:de.micromata.genome.tpsb.httpmockup.MockHttpServletRequest.java
/** Gets an enumeration containing all the parameter names present. */ @Override/*from w w w . j a v a 2s . com*/ public Enumeration getParameterNames() { return Collections.enumeration(this.parameters.keySet()); }
From source file:com.boylesoftware.web.impl.RouterRequestImpl.java
@Override public Enumeration<String> getParameterNames() { if (this.parameterNamesFilled) return Collections.enumeration(this.parameterNames); if (!this.hasAddlParams) return super.getParameterNames(); this.parameterNames.addAll(super.getParameterMap().keySet()); this.parameterNames.addAll(this.addlParams.keySet()); this.parameterNamesFilled = true; return Collections.enumeration(this.parameterNames); }
From source file:org.apache.click.servlet.MockRequest.java
/** * Get the names of all of the headers./*from ww w .j a v a 2 s.co m*/ * * @return The header names */ public Enumeration<String> getHeaderNames() { return Collections.enumeration(headers.keySet()); }
From source file:com.twinsoft.convertigo.engine.ContextManager.java
@Deprecated public Enumeration<?> getAll() { return Collections.enumeration(contexts.values()); }
From source file:org.mifos.accounts.loan.struts.actionforms.LoanAccountActionFormTest.java
public void testShouldGetSelectedClientIdsFromRequest() throws Exception { HttpServletRequest requestMock = createMock(HttpServletRequest.class); expect(requestMock.getParameterNames()) .andReturn(Collections.enumeration(asList("clients[0]", "clients[1]", "clients[2]"))); expect(requestMock.getParameter("clients[0]")).andReturn("1"); expect(requestMock.getParameter("clients[1]")).andReturn("2"); expect(requestMock.getParameter("clients[2]")).andReturn("3"); replay(requestMock);//from w ww. jav a 2s. c o m Assert.assertEquals(asList("1", "2", "3"), form.getSelectedClientIdsFromRequest(requestMock)); verify(requestMock); }
From source file:org.apache.click.servlet.MockRequest.java
/** * Get enumeration of all header values with the given name. * * @param name The name// w w w. ja v a 2 s.c o m * @return The header values */ public Enumeration<String> getHeaders(final String name) { List<String> list = headers.get(name); if (list == null) { list = new ArrayList<String>(); } return Collections.enumeration(list); }
From source file:net.riezebos.thoth.testutil.ThothTestBase.java
protected Enumeration<String> getParameterNames() { return Collections.enumeration(new HashSet<>(parameters.keySet())); }
From source file:org.apache.click.servlet.MockServletContext.java
/** * Get the name of all of the init parameters. * * @return The init parameter names/*from w w w . java 2s . c o m*/ */ public Enumeration<String> getInitParameterNames() { return Collections.enumeration(initParameters.keySet()); }