public final class CompoundTemplateEntry extends java.lang.Object implements TemplateEntry
TemplateEntry that concatenates several templates.| Modifier and Type | Field and Description |
|---|---|
private TemplateEntry[] |
entries |
| Modifier | Constructor and Description |
|---|---|
private |
CompoundTemplateEntry(TemplateEntry... entries) |
| Modifier and Type | Method and Description |
|---|---|
void |
appendText(java.lang.StringBuilder result,
TemplateEngineDataProvider dataProvider)
Execute this template by generating text for a given data provider.
|
boolean |
equals(java.lang.Object obj) |
static TemplateEntry |
fromArray(TemplateEntry... entries)
Factory method to concatenate several
TemplateEntrys. |
int |
hashCode() |
boolean |
isValid(TemplateEngineDataProvider dataProvider)
Check if this template is applicable to the given data provider.
|
java.lang.String |
toString() |
private final TemplateEntry[] entries
private CompoundTemplateEntry(TemplateEntry... entries)
public static TemplateEntry fromArray(TemplateEntry... entries)
TemplateEntrys.
If the number of entries is 0 or 1, the result may not be a CompoundTemplateEntry,
but optimized to a static text or the single entry itself.entries - the TemplateEntrys to concatenateTemplateEntry that concatenates all the entriespublic void appendText(java.lang.StringBuilder result, TemplateEngineDataProvider dataProvider)
TemplateEntryappendText in interface TemplateEntryresult - the StringBuilder to append the text todataProvider - the data provider from which information should be compiled to a stringpublic boolean isValid(TemplateEngineDataProvider dataProvider)
TemplateEntryisValid in interface TemplateEntrydataProvider - the data provider to checkpublic java.lang.String toString()
toString in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Object