Class AbstractTypeManufacturer<T>

    • Constructor Detail

      • AbstractTypeManufacturer

        public AbstractTypeManufacturer()
    • Method Detail

      • findElementOfType

        public <R> R findElementOfType​(Collection<?> collection,
                                       Class<R> type)
        Type Parameters:
        R - The type for which should be found
        Parameters:
        collection - collection with elements
        type - a type of which element should be found
        Returns:
        element of desired type or null, if the collection doesn't contain any object of that type.
      • getInteger

        public int getInteger​(int bound)
        It returns a int/Integer value in an interval (0, bound).
        Parameters:
        bound - the upper bound (inclusive). Must be positive.
        Returns:
        A random int value.
      • getDouble

        public double getDouble()
        It returns a double value in an interval (0, 1.0)
        Returns:
        A random double value