net.sf.qualitytest.blueprint
Class CollectionBlueprint

java.lang.Object
  extended by net.sf.qualitytest.blueprint.CollectionBlueprint

public final class CollectionBlueprint
extends Object

This class contains utilities for blueprinting collections.

Author:
Dominik Seichter

Method Summary
static
<T> void
addMany(Collection<T> collection, Class<T> clazz, int numberOfItems)
          A small utility to fill a collection automatically with blueprinted objects.
static
<T> void
addMany(Collection<T> collection, Class<T> clazz, int numberOfItems, BlueprintConfiguration config)
          A small utility to fill a collection automatically with blueprinted objects.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

addMany

public static <T> void addMany(@Nonnull
                               Collection<T> collection,
                               @Nonnull
                               Class<T> clazz,
                               @Nonnegative
                               int numberOfItems)
A small utility to fill a collection automatically with blueprinted objects. The default configuration is used.

Type Parameters:
T - type of the objects to blueprint and add
Parameters:
collection - a collection where objects are supposed to be added
clazz - the class of the type which is to be added
numberOfItems - the number of items that should be added.
See Also:
Blueprint.def

addMany

public static <T> void addMany(@Nonnull
                               Collection<T> collection,
                               @Nonnull
                               Class<T> clazz,
                               @Nonnegative
                               int numberOfItems,
                               @Nonnull
                               BlueprintConfiguration config)
A small utility to fill a collection automatically with blueprinted objects.

Type Parameters:
T - type of the objects to blueprint and add
Parameters:
collection - a collection where objects are supposed to be added
clazz - the class of the type which is to be added
numberOfItems - the number of items that should be added.
config - The configuration to use


Copyright © 2012-2013. All Rights Reserved.