Class DynamicListCombinationGenerator<T>
- java.lang.Object
-
- org.eclipse.epsilon.epl.combinations.DynamicListCombinationGenerator<T>
-
- All Implemented Interfaces:
java.util.Iterator<java.util.List<T>>
,CombinationGenerator<T>
public class DynamicListCombinationGenerator<T> extends java.lang.Object implements CombinationGenerator<T>
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.List<T>
list
protected ListCombinationGenerator<T>
listCombinationGenerator
protected java.util.ArrayList<CombinationGeneratorListener<T>>
listeners
protected int
n
protected java.lang.Boolean
optional
protected boolean
producedValidCombination
protected org.eclipse.epsilon.epl.combinations.DynamicListCombinationGenerator.State
state
-
Constructor Summary
Constructors Constructor Description DynamicListCombinationGenerator(java.util.List<T> list, int n)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addListener(CombinationGeneratorListener<T> listener)
protected boolean
checkOptional()
protected void
createCombinationGenerator()
boolean
hasNext()
protected void
init(java.util.List<T> list, int n)
boolean
isOptional()
java.util.List<T>
next()
protected void
nudgeList()
Nudge the list so that it loads its contents if it's dynamicvoid
producedValidCombination()
void
removeListener(CombinationGeneratorListener<T> listener)
void
reset()
-
-
-
Field Detail
-
n
protected int n
-
list
protected java.util.List<T> list
-
listCombinationGenerator
protected ListCombinationGenerator<T> listCombinationGenerator
-
listeners
protected java.util.ArrayList<CombinationGeneratorListener<T>> listeners
-
producedValidCombination
protected boolean producedValidCombination
-
state
protected org.eclipse.epsilon.epl.combinations.DynamicListCombinationGenerator.State state
-
optional
protected java.lang.Boolean optional
-
-
Constructor Detail
-
DynamicListCombinationGenerator
public DynamicListCombinationGenerator(java.util.List<T> list, int n)
-
-
Method Detail
-
init
protected void init(java.util.List<T> list, int n)
-
addListener
public void addListener(CombinationGeneratorListener<T> listener)
-
removeListener
public void removeListener(CombinationGeneratorListener<T> listener)
-
createCombinationGenerator
protected void createCombinationGenerator()
-
reset
public void reset()
- Specified by:
reset
in interfaceCombinationGenerator<T>
-
hasNext
public boolean hasNext()
- Specified by:
hasNext
in interfacejava.util.Iterator<T>
-
nudgeList
protected void nudgeList()
Nudge the list so that it loads its contents if it's dynamic
-
checkOptional
protected boolean checkOptional()
-
producedValidCombination
public void producedValidCombination()
- Specified by:
producedValidCombination
in interfaceCombinationGenerator<T>
-
isOptional
public final boolean isOptional()
-
-