org.apache.activemq.apollo.util
Class Combinator
java.lang.Object
org.apache.activemq.apollo.util.Combinator
public class Combinator
- extends java.lang.Object
Combinator objects are used to compute all the possible combinations given a set of combination options.
This class is generally use in conjunction with TestNG test cases generate the @Factory and @DataProvider
results.
- Author:
- Hiram Chirino
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Combinator
public Combinator()
Combinator
public Combinator(Combinator parent)
combinator
public static Combinator combinator()
all
public java.util.ArrayList<Combinator> all()
put
public Combinator put(java.lang.String attribute,
java.lang.Object... options)
and
public Combinator and()
add
public Combinator add(java.lang.Object... options)
combinations
public java.util.Set<java.util.Map<java.lang.String,java.lang.Object>> combinations()
combinationsAsBeans
public <T> java.lang.Object[] combinationsAsBeans(java.lang.Class<T> clazz)
throws java.lang.Exception
- Creates a bean for each combination of the type specified by clazz arguement and uses setter/field
injection to initialize the Bean with the combination values.
- Type Parameters:
T
- - Parameters:
clazz
-
- Returns:
-
- Throws:
java.lang.InstantiationException
java.lang.IllegalAccessException
java.lang.Exception
combinationsAsParameterArgBeans
public <T> java.lang.Object[][] combinationsAsParameterArgBeans(java.lang.Class<T> clazz)
throws java.lang.Exception
- Throws:
java.lang.Exception
asBeans
public <T> T[] asBeans(Combinator.BeanFactory<T> factory)
throws java.lang.Exception
- Creates a bean for each combination of the type specified by clazz argument and uses setter/field
injection to initialize the Bean with the combination values.
- Parameters:
clazz
-
- Returns:
-
- Throws:
java.lang.InstantiationException
java.lang.IllegalAccessException
java.lang.Exception
combinationsAsParameterArgBeans
public <T> java.lang.Object[][] combinationsAsParameterArgBeans(Combinator.BeanFactory<T> factory)
throws java.lang.Exception
- Throws:
java.lang.Exception
combinationsAsParameterArgs
public java.lang.Object[][] combinationsAsParameterArgs()
Copyright © 2005-2011 The Apache Software Foundation. All Rights Reserved.