java实现遍历树形菜单方法——实体类VoteTree
生活随笔
收集整理的這篇文章主要介紹了
java实现遍历树形菜单方法——实体类VoteTree
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
package org.entity;import java.util.ArrayList;
import java.util.List;/***
*
* 項目名稱:testTree
* 類名稱:VoteTree
* 類描述: 樹形菜單實體類
* 創建人:Mu Xiongxiong
* 創建時間:2017-5-23 下午6:18:29
* 修改人:Mu Xiongxiong
* 修改時間:2017-5-23 下午6:18:29
* 修改備注:
* @version
**/
public class VoteTree implements java.io.Serializable {// Fields/*** @Fields id : 編號*/private Long id;/*** @Fields text : 文字*/private String text;/*** @Fields pid :父目錄的id*/private Long pid;/*** @Fields levels : 所在級別*/private Long levels;/*** @Fields children : 子節點集合*/private List children = new ArrayList();// Constructors/** minimal constructor */public VoteTree(Long id, String text) {this.id = id;this.text = text;}/** full constructor */public VoteTree(Long id, String text, Long pid) {this.id = id;this.text = text;this.pid = pid;}// Property accessorspublic Long getId() {return this.id;}public void setId(Long id) {this.id = id;}public String getText() {return this.text;}public void setText(String text) {this.text = text;}public Long getPid() {return this.pid;}public void setPid(Long pid) {this.pid = pid;}public List getChildren() {return children;}public void setChildren(List children) {this.children = children;}public VoteTree(Long id, String text, Long pid, List children) {super();this.id = id;this.text = text;this.pid = pid;this.children = children;}public VoteTree() {super();}public Long getLevels() {return levels;}public void setLevels(Long levels) {this.levels = levels;}}
總結
以上是生活随笔為你收集整理的java实现遍历树形菜单方法——实体类VoteTree的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 平面设计师的电脑配置有什么要求?
- 下一篇: 做平面设计需要什么配置的电脑?