T - 所涉及对象的类型public class ListWithLock<T> extends ObjWithLock<List<T>>
| Constructor and Description |
|---|
ListWithLock(List<T> list)
构造对象
|
ListWithLock(List<T> list,
ReentrantReadWriteLock lock)
构造对象
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(T t)
添加对象
|
void |
clear()
清空
|
boolean |
remove(T t)
删除对象
|
int |
size()
对象大小
|
public ListWithLock(List<T> list, ReentrantReadWriteLock lock)
list - 对象列表lock - 读写锁Copyright © 2022. All rights reserved.