Package org.apache.commons.exec.util
Class MapUtils
java.lang.Object
org.apache.commons.exec.util.MapUtils
Helper classes to manipulate maps to pass substition map to the CommandLine. This class is not part of the public API
and could change without warning.
- Version:
- $Id: MapUtils.java 1636205 2014-11-02 22:32:33Z ggregory $
-
Constructor Details
-
MapUtils
public MapUtils()
-
-
Method Details
-
copy
Clones a map.- Type Parameters:
K
- the map key typeV
- the map value type- Parameters:
source
- the Map to clone- Returns:
- the cloned map
-
prefix
Clones a map and prefixes the keys in the clone, e.g. for mapping "JAVA_HOME" to "env.JAVA_HOME" to simulate the behaviour of Ant.- Type Parameters:
K
- the map key typeV
- the map value type- Parameters:
source
- the source mapprefix
- the prefix used for all names- Returns:
- the clone of the source map
-
merge
Clones the lhs map and add all things from the rhs map.- Type Parameters:
K
- the map key typeV
- the map value type- Parameters:
lhs
- the first maprhs
- the second map- Returns:
- the merged map
-