Package org.aoju.bus.core.lock
Class ListWithLock<T>
- Type Parameters:
T- 所涉及对象的类型
- All Implemented Interfaces:
Serializable
List对象读写锁
- Since:
- Java 17+
- Author:
- Kimi Liu
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionListWithLock(List<T> list) 构造对象ListWithLock(List<T> list, ReentrantReadWriteLock lock) 构造对象 -
Method Summary
-
Constructor Details
-
ListWithLock
-
ListWithLock
构造对象- Parameters:
list- 对象列表lock- 读写锁
-
-
Method Details
-
add
-
clear
public void clear()清空 -
remove
-
size
public int size()对象大小- Returns:
- the int
-