Class ObjectContainer<T>
- java.lang.Object
-
- ru.tinkoff.qa.neptune.core.api.concurrency.ObjectContainer<T>
-
public class ObjectContainer<T> extends Object
-
-
Constructor Summary
Constructors Constructor Description ObjectContainer(T t)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static <T> List<ObjectContainer<?>>
getAllObjects(Class<T> tClass, Predicate<ObjectContainer<?>> predicate)
T
getWrappedObject()
static <T> ObjectContainer<T>
setObjectBusy(Class<T> tClass)
Sets any free object ofObjectContainer
by current thread and returns it when any one is found.
-
-
-
Constructor Detail
-
ObjectContainer
public ObjectContainer(T t)
-
-
Method Detail
-
getAllObjects
public static <T> List<ObjectContainer<?>> getAllObjects(Class<T> tClass, Predicate<ObjectContainer<?>> predicate)
-
setObjectBusy
public static <T> ObjectContainer<T> setObjectBusy(Class<T> tClass)
Sets any free object ofObjectContainer
by current thread and returns it when any one is found.- Type Parameters:
T
- is a type of wrapped objects.- Parameters:
tClass
- is a class of wrapped objects.getWrappedObject()
- Returns:
- an object of
ObjectContainer
that has become busy if there is some objects free of threads.
-
getWrappedObject
public T getWrappedObject()
-
-