zoukankan      html  css  js  c++  java
  • 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 accessors
    
    	public 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;
    	}
    
    	
    }

  • 相关阅读:
    Spark API 之 map、mapPartitions、mapValues、flatMap、flatMapValues详解
    大三寒假生活9
    大三寒假生活8
    大三寒假生活7
    MySQL SQL DML (数据操作语言)
    MySQL JOIN
    Python 可执行对象
    Python __slots__
    Python tempfile (临时文件)
    Python 文件操作
  • 原文地址:https://www.cnblogs.com/a1111/p/7459717.html
Copyright © 2011-2022 走看看