Constant data are obvious candidates for immutability, and objects with complex and frequently changing states are generally inappropriate candidates for implementation with immutable classes.

 
  • 常量数据显然符合不变性,而状态复杂且频繁更改的对象通常不适合用不变类来实现。
今日热词
目录 附录 查词历史