org.apache.maven.shared.filtering
Class CompositeMap

java.lang.Object
  extended by java.util.AbstractMap
      extended by org.apache.maven.shared.filtering.CompositeMap
All Implemented Interfaces:
Map

public class CompositeMap
extends AbstractMap

A Map composed with some others (optional adding SystemProperties and envvar). The get method look in the Map list to return the corresponding value.

Version:
$Id: CompositeMap.java 1055685 2011-01-05 23:14:08Z dennisl $
Author:
olamy

Nested Class Summary
 
Nested classes/interfaces inherited from interface java.util.Map
Map.Entry<K,V>
 
Constructor Summary
CompositeMap(List maps)
           
CompositeMap(List maps, boolean useSystemProperties, boolean systemPropertiesFirst)
           
 
Method Summary
 void addMap(Map map)
           
 Set entrySet()
           
 Object get(Object key)
           
 List getMaps()
           
 boolean isSystemPropertiesFirst()
           
 void setSystemPropertiesFirst(boolean systemPropertiesFirst)
           
 
Methods inherited from class java.util.AbstractMap
clear, clone, containsKey, containsValue, equals, hashCode, isEmpty, keySet, put, putAll, remove, size, toString, values
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CompositeMap

public CompositeMap(List maps)
Parameters:
maps -

CompositeMap

public CompositeMap(List maps,
                    boolean useSystemProperties,
                    boolean systemPropertiesFirst)
Parameters:
maps - an ordered List of Map
useSystemProperties - using or not the System Properties
systemPropertiesFirst - if with get( key ) the sysProps must win (the internal ordered List will have in first the System Properties)
Method Detail

get

public Object get(Object key)
Specified by:
get in interface Map
Overrides:
get in class AbstractMap

entrySet

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

getMaps

public List getMaps()

addMap

public void addMap(Map map)

isSystemPropertiesFirst

public boolean isSystemPropertiesFirst()

setSystemPropertiesFirst

public void setSystemPropertiesFirst(boolean systemPropertiesFirst)


Copyright © 2002-2011 The Apache Software Foundation. All Rights Reserved.