Andrew520
public enum  StatisticTableEnum {

	DOC_BROWSE_STATISTIC("doc_browse_statistic"),
	DOC_LIB_BROWSE_STATISTIC("doc_lib_browse_statistic"),
	SEARCH_KEY_STATISTIC("search_key_statistic"),
	SEARCH_STATISTIC("search_statistic"),
	USER_COLLECT_STATISTIC("user_collect_statistic"),
	USER_COMMENT_STATISTIC("user_comment_statistic"),
	USER_NOTE_STATISTIC("user_note_statistic"),
	USER_STATISTIC("user_statistic");
	private String tableName;

	StatisticTableEnum(String tableName) {
		this.tableName = tableName;
	}

	public String getTableName() {
		return tableName;
	}
}

  代码中直接调用时就已经进行了构造函数的初始化:

StatisticTableEnum.DOC_LIB_BROWSE_STATISTIC.getTableName()

http://www.runoob.com/java/method-enum1.html

 


分类:

技术点:

相关文章:

  • 2021-12-06
  • 2022-12-23
  • 2022-12-23
  • 2021-08-03
  • 2022-12-23
  • 2022-01-09
  • 2022-01-19
  • 2022-12-23
猜你喜欢
  • 2021-09-24
  • 2022-12-23
  • 2021-09-24
  • 2021-08-05
  • 2021-09-13
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案