nl.beesting.beangenerator.generator
Class IntegralNumberInstanceGenerator
java.lang.Object
nl.beesting.beangenerator.generator.AbstractInstanceGenerator
nl.beesting.beangenerator.generator.IntegralNumberInstanceGenerator
- All Implemented Interfaces:
- InstanceGenerator
public class IntegralNumberInstanceGenerator
- extends AbstractInstanceGenerator
Instance generator for integral number types.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
IntegralNumberInstanceGenerator
public IntegralNumberInstanceGenerator()
init
public void init(ParameterPair[] initParams)
- Initializes the instance generator with the given array of objects.
generateInstance
public java.lang.Object generateInstance(java.lang.Class<?> type)
throws TypeNotSupportedException
- Create an instance for the given class. The returned object is of the given class. Note the following about the usage
of between init parameters (@see #init(ParameterPair[])) if for a supported type the from or until value lies out of
the boundaries of that type, the between values are set to the boundaries of the type.
- Parameters:
type
- the type for which a random instance must be generated
- Returns:
- a random floating point object between the defined from and until value
- Throws:
TypeNotSupportedException
- if the given type
is not supported.- See Also:
init(ParameterPair[])
generateInstance
public java.lang.Object generateInstance(java.lang.Class<?> type,
int modus)
throws TypeNotSupportedException
- Create an instance for the given class with an instance generator specific modus. The returned object is of the given
class.
- Returns:
-
- Throws:
TypeNotSupportedException
getFromValue
protected java.lang.Object getFromValue()
- Specified by:
getFromValue
in class AbstractInstanceGenerator
getUntilValue
protected java.lang.Object getUntilValue()
- Specified by:
getUntilValue
in class AbstractInstanceGenerator
getDefaultFromValue
protected java.lang.Object getDefaultFromValue()
- Specified by:
getDefaultFromValue
in class AbstractInstanceGenerator
getDefaultUntilValue
protected java.lang.Object getDefaultUntilValue()
- Specified by:
getDefaultUntilValue
in class AbstractInstanceGenerator
Copyright © 2008. All Rights Reserved.