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