org.apache.portals.bridges.jsf
Class AbstractAttributeMap

java.lang.Object
  extended byorg.apache.portals.bridges.jsf.AbstractAttributeMap
All Implemented Interfaces:
Map
Direct Known Subclasses:
ApplicationMap, InitParameterMap, RequestHeaderMap, RequestHeaderValuesMap, RequestMap, RequestParameterMap, RequestParameterValuesMap, ServletCookieMap, ServletRequestHeaderMap, ServletRequestHeaderValuesMap, ServletRequestMap, SessionMap

public abstract class AbstractAttributeMap
extends Object
implements Map

Helper Map implementation for use with different Attribute Maps.

See MyFaces project for servlet implementation.

Author:
David Le Strat

Nested Class Summary
private  class AbstractAttributeMap.EntryIterator
          Not very efficient since it generates a new instance of Entry for each element and still internaly uses the KeyIterator.
private  class AbstractAttributeMap.EntrySet
           
private  class AbstractAttributeMap.EntrySetEntry
           
private  class AbstractAttributeMap.KeyIterator
           
private  class AbstractAttributeMap.KeySet
           
private  class AbstractAttributeMap.Values
           
private  class AbstractAttributeMap.ValuesIterator
           
 
Nested classes inherited from class java.util.Map
Map.Entry
 
Field Summary
private  Set entrySet
           
private  Set keySet
           
private  Collection values
           
 
Constructor Summary
AbstractAttributeMap()
           
 
Method Summary
 void clear()
           
 boolean containsKey(Object key)
           
 boolean containsValue(Object findValue)
           
 Set entrySet()
           
 Object get(Object key)
           
protected abstract  Object getAttribute(String key)
           Gets an attribute given a key.
protected abstract  Enumeration getAttributeNames()
           Gets the attributes names.
 boolean isEmpty()
           
 Set keySet()
           
 Object put(Object key, Object value)
           
 void putAll(Map t)
           
 Object remove(Object key)
           
protected abstract  void removeAttribute(String key)
           Removes an attribute.
protected abstract  void setAttribute(String key, Object value)
           Sets an attribute given a key/value.
 int size()
           
 Collection values()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.Map
equals, hashCode
 

Field Detail

keySet

private Set keySet

values

private Collection values

entrySet

private Set entrySet
Constructor Detail

AbstractAttributeMap

public AbstractAttributeMap()
Method Detail

clear

public void clear()
Specified by:
clear in interface Map
See Also:
Map.clear()

containsKey

public boolean containsKey(Object key)
Specified by:
containsKey in interface Map
See Also:
Map.containsKey(java.lang.Object)

containsValue

public boolean containsValue(Object findValue)
Specified by:
containsValue in interface Map
See Also:
Map.containsValue(java.lang.Object)

entrySet

public Set entrySet()
Specified by:
entrySet in interface Map
See Also:
Map.entrySet()

get

public Object get(Object key)
Specified by:
get in interface Map
See Also:
Map.get(java.lang.Object)

isEmpty

public boolean isEmpty()
Specified by:
isEmpty in interface Map
See Also:
Map.isEmpty()

keySet

public Set keySet()
Specified by:
keySet in interface Map
See Also:
Map.keySet()

put

public Object put(Object key,
                  Object value)
Specified by:
put in interface Map
See Also:
Map.put(java.lang.Object, java.lang.Object)

putAll

public void putAll(Map t)
Specified by:
putAll in interface Map
See Also:
Map.putAll(java.util.Map)

remove

public Object remove(Object key)
Specified by:
remove in interface Map
See Also:
Map.remove(java.lang.Object)

size

public int size()
Specified by:
size in interface Map
See Also:
Map.size()

values

public Collection values()
Specified by:
values in interface Map
See Also:
Map.values()

getAttribute

protected abstract Object getAttribute(String key)

Gets an attribute given a key.

Parameters:
key - The key.
Returns:
The attribute.

setAttribute

protected abstract void setAttribute(String key,
                                     Object value)

Sets an attribute given a key/value.

Parameters:
key - The key.
value - The value.

removeAttribute

protected abstract void removeAttribute(String key)

Removes an attribute.

Parameters:
key - The key.

getAttributeNames

protected abstract Enumeration getAttributeNames()

Gets the attributes names.

Returns:
An enumeration of attributes names.


Copyright © 2005-2007 Apache Software Foundation. All Rights Reserved.