Method from org.apache.commons.chain.web.servlet.ServletCookieMap Detail: |
public void clear() {
throw new UnsupportedOperationException();
}
|
public boolean containsKey(Object key) {
return (get(key) != null);
}
|
public boolean containsValue(Object value) {
Cookie[] cookies = request.getCookies();
if (cookies != null) {
for (int i = 0; i < cookies.length; i++) {
if (cookies[i].equals(value)) {
return true;
}
}
}
return (false);
}
|
public Set entrySet() {
Set set = new HashSet();
Cookie[] cookies = request.getCookies();
if (cookies != null) {
for (int i = 0; i < cookies.length; i++) {
set.add(new MapEntry(cookies[i].getName(), cookies[i], false));
}
}
return (set);
}
|
public boolean equals(Object o) {
return (request.equals(o));
}
|
public Object get(Object key) {
Cookie[] cookies = request.getCookies();
if (cookies != null) {
for (int i = 0; i < cookies.length; i++) {
if (cookies[i].getName().equals(key(key))) {
return cookies[i];
}
}
}
return null;
}
|
public int hashCode() {
return (request.hashCode());
}
|
public boolean isEmpty() {
return (size() < 1);
}
|
public Set keySet() {
Set set = new HashSet();
Cookie[] cookies = request.getCookies();
if (cookies != null) {
for (int i = 0; i < cookies.length; i++) {
set.add(cookies[i].getName());
}
}
return (set);
}
|
public Object put(Object key,
Object value) {
throw new UnsupportedOperationException();
}
|
public void putAll(Map map) {
throw new UnsupportedOperationException();
}
|
public Object remove(Object key) {
throw new UnsupportedOperationException();
}
|
public int size() {
Cookie[] cookies = request.getCookies();
return (cookies == null ? 0 : cookies.length);
}
|
public Collection values() {
List list = new ArrayList(size());
Cookie[] cookies = request.getCookies();
if (cookies != null) {
for (int i = 0; i < cookies.length; i++) {
list.add(cookies[i]);
}
}
return (list);
}
|