com.boylesoftware.cb2.util
Class TextUtils.MapValueGetter

java.lang.Object
  extended bycom.boylesoftware.cb2.util.TextUtils.MapValueGetter
All Implemented Interfaces:
TextUtils.ValueGetter
Enclosing class:
TextUtils

public static class TextUtils.MapValueGetter
extends java.lang.Object
implements TextUtils.ValueGetter

Standard implementation of ValueGetter interface, which takes values for macros from a map object. The values in the map are automatically converted to strings using toString method.


Constructor Summary
TextUtils.MapValueGetter(java.util.Map values)
          Constructs a getter instance.
 
Method Summary
 java.lang.String get(java.lang.String name)
          Gets the specified macro's value from the map.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TextUtils.MapValueGetter

public TextUtils.MapValueGetter(java.util.Map values)
Constructs a getter instance.

Parameters:
values - the map with macro values by macro names.
Method Detail

get

public java.lang.String get(java.lang.String name)
Gets the specified macro's value from the map.

Specified by:
get in interface TextUtils.ValueGetter
Parameters:
name - the macro name.
Returns:
the macro value or null if there is no value associated with this name in the map.


Copyright © 2002,2003,2004 - Boyle Software, Inc.