com.ds.fw.types.string
Class FwStringExpander

java.lang.Object
  |
  +--com.ds.fw.types.string.FwStringExpander

public class FwStringExpander
extends java.lang.Object


Field Summary
 char[] buffer
          In this buffer the expanded string will be placed.
 int bufferLength
          the buffer length
 int defaultLength
          the default buffer length
 int defaultPadding
          default value for buffer size increasing
 java.util.Hashtable macros
          hashtable with macros
 java.lang.String template
          the template string
 
Constructor Summary
FwStringExpander()
           
 
Method Summary
static java.lang.String expandTemplate(java.lang.String template, java.util.Hashtable ht)
          Expands a template string, replacing the macros with their values.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

macros

public java.util.Hashtable macros
hashtable with macros


template

public java.lang.String template
the template string


buffer

public char[] buffer
In this buffer the expanded string will be placed.


bufferLength

public int bufferLength
the buffer length


defaultLength

public int defaultLength
the default buffer length


defaultPadding

public int defaultPadding
default value for buffer size increasing

Constructor Detail

FwStringExpander

public FwStringExpander()
Method Detail

expandTemplate

public static java.lang.String expandTemplate(java.lang.String template,
                                              java.util.Hashtable ht)
Expands a template string, replacing the macros with their values.

Parameters:
template - the template string
ht - the hashtable with macros
Returns:
the expanded string