设计模式 - Immutable 模式(Java不变集合类 vs Google Guava不变集合类)
摘要:
总结 JDK中的unmodifiableList的构造函数是对原始集合的浅拷贝, 而Guava.ImmutableList.copyOf是对原始集合的深拷贝 public class ImmutableDemo { public static void main(String[] args) { L 阅读全文
posted @ 2023-11-10 16:49 frank_cui 阅读(7) 评论(0) 推荐(0) 编辑