public static class TemplateParser.Template extends Object
Modifier and Type | Field and Description |
---|---|
protected String |
name |
protected Map<String,String> |
namedParams |
protected List<String> |
numberedParams |
Constructor and Description |
---|
Template(String name)
Creates a new template with the given name.
|
Modifier and Type | Method and Description |
---|---|
void |
addParam(String value)
Add a numbered parameter with the given value.
|
void |
addParam(String key,
String value)
Add a named parameter with the given key and value.
|
String |
getName()
Returns the name of the template.
|
String |
getNamedParam(String key)
Return the named parameter with the given key or
null/ |
Iterable<Map.Entry<String,String>> |
getNamedParams()
Iterate over all named parameters.
|
int |
getNamedParamsCount()
Returns number of all named parameters.
|
String |
getNumberedParam(int idx)
Return the numbered parameter with the given index or
null/ |
Iterable<String> |
getNumberedParams()
Iterate over all numbered parameters.
|
int |
getNumberedParamsCount()
Returns number of all numbered parameters.
|
int |
getParamsCount()
Returns the number of all parameters (including numbered and named
paramters).
|
protected String name
public Template(String name)
public String getName()
public void addParam(String value)
public void addParam(String key, String value)
public String getNumberedParam(int idx)
null/
if no such parameter exists.
public String getNamedParam(String key)
null/
if no such parameter exists.
public Iterable<Map.Entry<String,String>> getNamedParams()
public int getParamsCount()
public int getNumberedParamsCount()
public int getNamedParamsCount()
Copyright © 2011-2016 Ubiquitous Knowledge Processing (UKP) Lab. All Rights Reserved.