欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

eclipse生成boolean类型getter,setter,is开头的问题

程序员文章站 2022-06-16 09:38:16
...

 

private boolean isDel;

public boolean isDel() {
	return isDel;
}
public void setDel(boolean isDel) {
	this.isDel = isDel;
}

 

使用引用类型Boolean就好了,

private Boolean isDel;

public Boolean getIsDel() {
	return isDel;
}
public void setIsDel(Boolean isDel) {
	this.isDel = isDel;
}

  

eclipse 配置lombok,注解生成getter,setter,equals,hashCode,toString
http://happyqing.iteye.com/blog/2410576