📄 sentencetemplate.java
字号:
package ijp.assignment1.langen;
/**
* A data structure for representing templates for a template driven language
* generator.
*
* @author Judy Robertson
*/
public class SentenceTemplate {
/**
* The question sentence type
*/
public static String QUESTION= "question";
/**
* The reply sentence type
*/
public static String REPLY ="reply";
/**
* The type of sentence stored in this template
*/
private String sentenceType;
/**
* A string representing this template
*/
private String template;
/**
* Create a sentence template of the specified type, with the specified
* template representation
*
* @param type The type of this template e.g. QUESTION
*
* @param temp The string representation of this template
*/
public SentenceTemplate(String type, String temp){
sentenceType = type;
template = temp;
}
/**
* Gets the type of this sentence template
* @return the type
*/
public String getSentenceType() {
return sentenceType;
}
/**
* Get the string representation of the template
* @return the template
*/
public String getTemplate() {
return template;
}
/**
* Set the type of this sentence template
* @param string the type
*/
public void setSentenceType(String string) {
sentenceType = string;
}
/**
* Set the string representation of this template
* @param string the template
*/
public void setTemplate(String string) {
template = string;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -