|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.qualitytest.blueprint.Create
public final class Create
A utility class to have a more readable API. This class holds possible creation strategies.
Method Summary | ||
---|---|---|
static
|
nil()
Always create null . |
|
static CreationStrategy<Boolean> |
randomBoolean()
Create a random boolean (true or false). |
|
static CreationStrategy<Byte> |
randomByte()
Create a random byte. |
|
static CreationStrategy<Character> |
randomChar()
Create a random character. |
|
static CreationStrategy<Double> |
randomDouble()
Create a random double. |
|
static CreationStrategy<Enum<?>> |
randomEnum()
Create a random enum constant whenever an enumeration is requested. |
|
static CreationStrategy<Float> |
randomFloat()
Create a random float. |
|
static CreationStrategy<Integer> |
randomInteger()
Create a random integer. |
|
static CreationStrategy<Long> |
randomLong()
Create a random long. |
|
static CreationStrategy<Short> |
randomShort()
Create a random short. |
|
static
|
value(T value)
Always create this value, when requested. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static <T> CreationStrategy<T> nil()
null
.
CreationStrategy
which always returns null
.public static CreationStrategy<Boolean> randomBoolean()
CreationStrategy
which always returns a random boolean.public static CreationStrategy<Byte> randomByte()
CreationStrategy
which always returns a random byte.public static CreationStrategy<Character> randomChar()
CreationStrategy
which always returns a random character.public static CreationStrategy<Double> randomDouble()
CreationStrategy
which always returns a random double.public static CreationStrategy<Enum<?>> randomEnum()
CreationStrategy
which always returns a random enum constact.public static CreationStrategy<Float> randomFloat()
CreationStrategy
which always returns a random float.public static CreationStrategy<Integer> randomInteger()
CreationStrategy
which always returns a random integer.public static CreationStrategy<Long> randomLong()
CreationStrategy
which always returns a random long.public static CreationStrategy<Short> randomShort()
CreationStrategy
which always returns a random short.public static <T> CreationStrategy<T> value(@Nonnull T value)
value
- a value
CreationStrategy
which always returns value.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |