com.endeca.navigation
Class MPropertyMap

java.lang.Object
  extended by java.util.AbstractMap
      extended by com.endeca.navigation.PropertyMap
          extended by com.endeca.navigation.MPropertyMap
All Implemented Interfaces:
java.util.Map

public class MPropertyMap
extends com.endeca.navigation.PropertyMap


Nested Class Summary
 
Nested classes/interfaces inherited from class java.util.AbstractMap
java.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>
 
Nested classes/interfaces inherited from interface java.util.Map
java.util.Map.Entry<K,V>
 
Constructor Summary
MPropertyMap()
           
MPropertyMap(com.endeca.navigation.PropertyMap pPropertyMap)
           
 
Method Summary
 void add(com.endeca.navigation.Property a)
          The only way to get data into this object.
 void clear()
           
 boolean containsKey(java.lang.Object key)
           
 java.util.Set entrySet()
          Gets the set of all properties in this property map
 java.util.Collection getValues(java.lang.String key)
          Gets the values associated with this key.
 boolean isEmpty()
           
 java.util.Set keySet()
           
 java.lang.Object put(java.lang.Object key, java.lang.Object value)
          The specified key should be of type String.
 void putAll(java.util.Map m)
           
 java.lang.Object remove(java.lang.Object key)
          Removes all the Property objects with the given key.
 boolean remove(com.endeca.navigation.Property pProperty)
          Removes a single Property object from the PropertyMap
 int size()
          Returns the number of Property objects in this PropertyMap
 java.util.Collection values()
          Same as entrySet() for PropertyMap
 
Methods inherited from class java.util.AbstractMap
containsValue, equals, get, hashCode, toString
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Map
containsValue, equals, get, hashCode
 

Constructor Detail

MPropertyMap

public MPropertyMap()

MPropertyMap

public MPropertyMap(com.endeca.navigation.PropertyMap pPropertyMap)
Method Detail

clear

public void clear()
Specified by:
clear in interface java.util.Map
Overrides:
clear in class java.util.AbstractMap

containsKey

public boolean containsKey(java.lang.Object key)
Specified by:
containsKey in interface java.util.Map
Overrides:
containsKey in class java.util.AbstractMap

entrySet

public java.util.Set entrySet()
Gets the set of all properties in this property map

Specified by:
entrySet in interface java.util.Map
Overrides:
entrySet in class com.endeca.navigation.PropertyMap
Returns:
The set of all properties.

getValues

public java.util.Collection getValues(java.lang.String key)
Gets the values associated with this key. This method offers features over the regular get method only when there are more than one property in the PropertyMap with the same key.

Overrides:
getValues in class com.endeca.navigation.PropertyMap
Returns:
A iterator for all the values associated with the key. Returns null when no values are associated with key.

isEmpty

public boolean isEmpty()
Specified by:
isEmpty in interface java.util.Map
Overrides:
isEmpty in class java.util.AbstractMap

keySet

public java.util.Set keySet()
Specified by:
keySet in interface java.util.Map
Overrides:
keySet in class java.util.AbstractMap

put

public java.lang.Object put(java.lang.Object key,
                            java.lang.Object value)
The specified key should be of type String. The specified value should by of type String, Property, or Collection. If the value is a Collection, the Collection must contain either Property or String objects.

This method calls the add(Property) method. If the specified value is of type String, a new MProperty will be created with the key and value. If the specified value is of type Property, the key is ignored, and the property is passed to the add(Property) method.

Specified by:
put in interface java.util.Map
Overrides:
put in class java.util.AbstractMap
Throws:
java.lang.IllegalArgumentException

putAll

public void putAll(java.util.Map m)
Specified by:
putAll in interface java.util.Map
Overrides:
putAll in class java.util.AbstractMap

remove

public java.lang.Object remove(java.lang.Object key)
Removes all the Property objects with the given key. Returns a Collection of Property objects

Specified by:
remove in interface java.util.Map
Overrides:
remove in class java.util.AbstractMap

remove

public boolean remove(com.endeca.navigation.Property pProperty)
Removes a single Property object from the PropertyMap

Parameters:
pProperty -
Returns:
true if the given Property could be removed. false otherwise

size

public int size()
Returns the number of Property objects in this PropertyMap

Specified by:
size in interface java.util.Map
Overrides:
size in class java.util.AbstractMap

values

public java.util.Collection values()
Same as entrySet() for PropertyMap

Specified by:
values in interface java.util.Map
Overrides:
values in class java.util.AbstractMap

add

public void add(com.endeca.navigation.Property a)
The only way to get data into this object.

Overrides:
add in class com.endeca.navigation.PropertyMap