com.github.yiuman.citrus.support.model.BaseTree Maven / Gradle / Ivy
package com.github.yiuman.citrus.support.model;
import com.baomidou.mybatisplus.annotation.TableField;
import org.springframework.util.CollectionUtils;
import java.util.List;
/**
* 基础树形结构
* @author yiuman
* @date 2020/5/22
*/
public abstract class BaseTree, K> implements Tree {
@TableField(exist = false)
private List children;
public BaseTree() {
}
@Override
public boolean isLeaf() {
return CollectionUtils.isEmpty(getChildren());
}
@Override
public List getChildren() {
return children;
}
public void setChildren(List children) {
this.children = children;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy