| 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sf.hermesftp.utils.VarMerger
public class VarMerger
Replaces all placeholders in a given text document with the values of a properties-Object. Example: The text "Hello ${name}" becomes "Hello world" provided that passed properties object contains the entry name=world.
 
   VarMerger vm = new VarMerger("The ${dog} chases the ${cat}");
   Properties p = new Properties();
   p.put("dog", "fox");
   p.put("cat", "mouse");
   vm.merge(p);
   String neuerSatz = vm.getText();
 
| Constructor Summary | |
|---|---|
VarMerger(java.lang.String text)
 | 
|
| Method Summary | |
|---|---|
 java.lang.String | 
getText()
 | 
 boolean | 
isReplacementComplete()
Pr�ft, ob der Text noch Platzhalter enth�lt, die noch nicht ersetzt wurden.  | 
 void | 
merge(java.util.Properties props)
Replaces the placeholders with the passed values.  | 
 void | 
setText(java.lang.String text)
Sets the text containing placeholders.  | 
| Methods inherited from class java.lang.Object | 
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Constructor Detail | 
|---|
public VarMerger(java.lang.String text)
text - Der Text containing placeholders.| Method Detail | 
|---|
public void merge(java.util.Properties props)
props - The values.public void setText(java.lang.String text)
text - The text.public java.lang.String getText()
public boolean isReplacementComplete()
  | 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||