Class CompositeCombinationGenerator<T>
- java.lang.Object
-
- org.eclipse.epsilon.epl.combinations.CompositeCombinationGenerator<T>
-
- All Implemented Interfaces:
Iterator<List<List<T>>>
,CombinationGenerator<List<T>>
public class CompositeCombinationGenerator<T> extends Object implements CombinationGenerator<List<T>>
-
-
Field Summary
Fields Modifier and Type Field Description protected int
currentGeneratorIndex
protected Stack<List<T>>
currentStack
protected List<CombinationGenerator<T>>
generators
protected List<List<T>>
lookahead
protected List<List<T>>
NEXT
protected List<List<T>>
UNKNOWN
protected CompositeCombinationValidator<T,EolRuntimeException>
validator
-
Constructor Summary
Constructors Constructor Description CompositeCombinationGenerator()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addCombinationGenerator(CombinationGenerator<T> g)
static List<String>
createList(String... strings)
protected CombinationGenerator<T>
getCurrentGenerator()
protected CombinationGenerator<T>
getNextGenerator()
protected List<List<T>>
getNextImpl()
protected CombinationGenerator<T>
getPreviousGenerator()
CompositeCombinationValidator<T,EolRuntimeException>
getValidator()
boolean
hasNext()
protected boolean
isFirstGenerator()
protected boolean
isLastGenerator()
protected boolean
isValidCombination()
List<List<T>>
next()
void
producedValidCombination()
boolean
removeCombinationGenerator(CombinationGenerator<T> g)
void
reset()
protected void
setCurrentGenerator(CombinationGenerator<T> g)
void
setValidator(CompositeCombinationValidator<T,EolRuntimeException> validator)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.util.Iterator
forEachRemaining, remove
-
-
-
-
Field Detail
-
generators
protected List<CombinationGenerator<T>> generators
-
currentGeneratorIndex
protected int currentGeneratorIndex
-
validator
protected CompositeCombinationValidator<T,EolRuntimeException> validator
-
-
Method Detail
-
getValidator
public CompositeCombinationValidator<T,EolRuntimeException> getValidator()
-
setValidator
public void setValidator(CompositeCombinationValidator<T,EolRuntimeException> validator)
-
addCombinationGenerator
public void addCombinationGenerator(CombinationGenerator<T> g)
-
removeCombinationGenerator
public boolean removeCombinationGenerator(CombinationGenerator<T> g)
-
reset
public void reset()
- Specified by:
reset
in interfaceCombinationGenerator<T>
-
isValidCombination
protected boolean isValidCombination()
-
getPreviousGenerator
protected CombinationGenerator<T> getPreviousGenerator()
-
getNextGenerator
protected CombinationGenerator<T> getNextGenerator()
-
getCurrentGenerator
protected CombinationGenerator<T> getCurrentGenerator()
-
setCurrentGenerator
protected void setCurrentGenerator(CombinationGenerator<T> g)
-
isFirstGenerator
protected boolean isFirstGenerator()
-
isLastGenerator
protected boolean isLastGenerator()
-
producedValidCombination
public void producedValidCombination()
- Specified by:
producedValidCombination
in interfaceCombinationGenerator<T>
-
-