return this的理解
今天在看代码的时候遇到了 return this这一段代码,心里有点不太明白具体含义,于是上网查询了一下.
this 代表对象的引用(也就是这个方法的实例化对象) 使用return this 这种编程方法,可以实现链式编程
一般在封装统一返回值之类的方法时使用
参考链接: https://blog.csdn.net/anhuang1896/article/details/101281604
https://www.cnblogs.com/huahua035/p/8383565.html