Class ObjectContainer<T>


  • public class ObjectContainer<T>
    extends Object
    • Constructor Detail

      • ObjectContainer

        public ObjectContainer​(T t)
    • Method Detail

      • setObjectBusy

        public static <T> ObjectContainer<T> setObjectBusy​(Class<T> tClass)
        Sets any free object of ObjectContainer 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()