public class CompositeCombinationGenerator<T> extends Object implements CombinationGenerator<List<T>>
Modifier and Type | Field and Description |
---|---|
protected int |
currentGeneratorIndex |
protected Stack<List<T>> |
currentStack |
protected ArrayList<CombinationGenerator<T>> |
generators |
protected List<List<T>> |
lookahead |
protected List<List<T>> |
NEXT |
protected List<List<T>> |
UNKNOWN |
protected CompositeCombinationValidator<T> |
validator |
Constructor and Description |
---|
CompositeCombinationGenerator() |
Modifier and Type | Method and Description |
---|---|
void |
addCombinationGenerator(CombinationGenerator<T> g) |
static List<String> |
createList(String... strings) |
protected CombinationGenerator<T> |
getCurrentGenerator() |
List<List<T>> |
getNext() |
protected CombinationGenerator<T> |
getNextGenerator() |
protected List<List<T>> |
getNextImpl() |
protected CombinationGenerator<T> |
getPreviousGenerator() |
CompositeCombinationValidator<T> |
getValidator() |
boolean |
hasMore() |
protected boolean |
isFirstGenerator() |
protected boolean |
isLastGenerator() |
protected boolean |
isValidCombination() |
static void |
main(String[] args) |
void |
producedValidCombination() |
boolean |
removeCombinationGenerator(CombinationGenerator<T> g) |
void |
reset() |
protected void |
setCurrentGenerator(CombinationGenerator<T> g) |
void |
setValidator(CompositeCombinationValidator<T> validator) |
protected ArrayList<CombinationGenerator<T>> generators
protected int currentGeneratorIndex
protected CompositeCombinationValidator<T> validator
public CompositeCombinationValidator<T> getValidator()
public void setValidator(CompositeCombinationValidator<T> validator)
public void addCombinationGenerator(CombinationGenerator<T> g)
public boolean removeCombinationGenerator(CombinationGenerator<T> g)
public boolean hasMore() throws Exception
hasMore
in interface CombinationGenerator<List<T>>
Exception
public List<List<T>> getNext() throws Exception
getNext
in interface CombinationGenerator<List<T>>
Exception
public void reset()
reset
in interface CombinationGenerator<List<T>>
protected CombinationGenerator<T> getPreviousGenerator()
protected CombinationGenerator<T> getNextGenerator()
protected CombinationGenerator<T> getCurrentGenerator()
protected void setCurrentGenerator(CombinationGenerator<T> g)
protected boolean isFirstGenerator()
protected boolean isLastGenerator()
public void producedValidCombination()
producedValidCombination
in interface CombinationGenerator<List<T>>
Copyright © 2016. All rights reserved.