org.codehaus.plexus.interpolation.fixed
Class MapBasedValueSource

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

public class MapBasedValueSource
extends Object
implements FixedValueSource

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

Version:
$Id$

Constructor Summary
MapBasedValueSource(Map values)
          Construct a new value source to wrap the supplied map.
 
Method Summary
 Object getValue(String expression, InterpolationState interpolationState)
          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(Map values)
Construct a new value source to wrap the supplied map.

Method Detail

getValue

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

Specified by:
getValue in interface FixedValueSource
Returns:
the value related to the expression, or null if not found (not available from this source)


Copyright © 2001-2014 Codehaus. All Rights Reserved.