尹成 百万算法之硅谷
2022-11-24 20:55 作者:bili_1559000721 | 我要投稿
SynchronizedList(List<E> list) {
super(list); // 调用父类构造器
this.list = list;}SynchronizedCollection(Collection<E> c) {
this.c = Objects.requireNonNull(c); //要求传入的 集合类实例 非空 并将这个集合赋值给 c 变量
mutex = this; // 将自己赋值给 互斥锁变量}