Class AbstractTypeManufacturer<T>
- java.lang.Object
-
- uk.co.jemos.podam.typeManufacturers.AbstractTypeManufacturer<T>
-
- Type Parameters:
T- The type of the value to be manufactured
- All Implemented Interfaces:
TypeManufacturer<T>
- Direct Known Subclasses:
ArrayTypeManufacturerImpl,BooleanTypeManufacturerImpl,ByteTypeManufacturerImpl,CharTypeManufacturerImpl,CollectionTypeManufacturerImpl,DoubleTypeManufacturerImpl,EnumTypeManufacturerImpl,FloatTypeManufacturerImpl,IntTypeManufacturerImpl,LongTypeManufacturerImpl,MapTypeManufacturerImpl,ShortTypeManufacturerImpl,StringTypeManufacturerImpl,TypeTypeManufacturerImpl
public abstract class AbstractTypeManufacturer<T> extends Object implements TypeManufacturer<T>
Parent of all type manufacturer. Created by tedonema on 28/06/2015.- Since:
- 6.0.0.RELEASE
-
-
Constructor Summary
Constructors Constructor Description AbstractTypeManufacturer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <R> RfindElementOfType(Collection<?> collection, Class<R> type)doublegetDouble()It returns a double value in an interval (0, 1.0)intgetInteger(int bound)It returns a int/Integer value in an interval (0, bound).-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface uk.co.jemos.podam.typeManufacturers.TypeManufacturer
getType
-
-
-
-
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 elementstype- 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
-
-