org.codehaus.plexus.interpolation
Class MapBasedValueSource

java.lang.Object
  extended by org.codehaus.plexus.interpolation.MapBasedValueSource
All Implemented Interfaces:
ValueSource

public class MapBasedValueSource
extends java.lang.Object
implements ValueSource

Wraps a Map, and looks up the whole expression as a single key, returning the value mapped to it.

Version:
$Id: MapBasedValueSource.java 7529 2008-07-20 20:24:21Z olamy $

Constructor Summary
MapBasedValueSource(java.util.Map values)
          Construct a new value source to wrap the supplied map.
 
Method Summary
 java.lang.Object getValue(java.lang.String expression)
          Lookup the supplied expression as a key in the wrapped Map, and return its value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MapBasedValueSource

public MapBasedValueSource(java.util.Map values)
Construct a new value source to wrap the supplied map.

Method Detail

getValue

public java.lang.Object getValue(java.lang.String expression)
Lookup the supplied expression as a key in the wrapped Map, and return its value.

Specified by:
getValue in interface ValueSource
Returns:
the value related to the expression, or null if not found.


Copyright © 2001-2010 Codehaus. All Rights Reserved.