1 16 package org.apache.cocoon.faces.context; 17 18 import org.apache.cocoon.environment.Request; 19 20 import java.util.Enumeration ; 21 import java.util.HashSet ; 22 import java.util.Set ; 23 24 30 class RequestParameterValuesMap extends BaseMap { 31 32 private Request request; 33 34 35 RequestParameterValuesMap(Request request) { 36 this.request = request; 37 } 38 39 public Object get(Object key) { 40 return request.getParameterValues(key.toString()); 41 } 42 43 public Set entrySet() { 44 Set entries = new HashSet (); 45 for (Enumeration e = request.getParameterNames(); e.hasMoreElements();) { 46 String name = (String ) e.nextElement(); 47 entries.add(new BaseMap.Entry(name, request.getParameterValues(name))); 48 } 49 50 return entries; 51 } 52 53 public boolean equals(Object obj) { 54 if (obj == null || !(obj instanceof RequestParameterValuesMap)) { 55 return false; 56 } 57 58 return super.equals(obj); 59 } 60 } 61 | Popular Tags |