Class CombinatorDiagonal<T>
- java.lang.Object
-
- ru.ispras.microtesk.test.sequence.internal.CompositeIterator<T>
-
- ru.ispras.microtesk.test.sequence.combinator.CombinatorDiagonal<T>
-
- All Implemented Interfaces:
Combinator<T>
,ru.ispras.testbase.knowledge.iterator.Iterator<java.util.List<T>>
public final class CombinatorDiagonal<T> extends CompositeIterator<T>
CombinatorDiagonal
implements the diagonal combinator of iterators.
-
-
Field Summary
-
Fields inherited from class ru.ispras.microtesk.test.sequence.internal.CompositeIterator
iterators
-
-
Constructor Summary
Constructors Constructor Description CombinatorDiagonal()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ru.ispras.microtesk.test.sequence.combinator.CombinatorBase<T>
clone()
boolean
doNext()
The callback method called in thenext
method.T
getValue(int i)
The callback method called in thevalue
method.boolean
hasValue()
void
init()
void
initialize(java.util.List<ru.ispras.testbase.knowledge.iterator.Iterator<T>> iterators)
void
next()
void
onInit()
The callback method called in theinit
method.void
stop()
java.util.List<T>
value()
-
Methods inherited from class ru.ispras.microtesk.test.sequence.internal.CompositeIterator
addIterator, addIterators, getIterators, removeIterator, removeIterators, setIterators, size
-
-
-
-
Method Detail
-
onInit
public void onInit()
The callback method called in theinit
method.
-
getValue
public T getValue(int i)
The callback method called in thevalue
method.- Parameters:
i
- the iterator index.- Returns:
- the value of the i-th iterator (
null
if the iterator has been exhausted, i.e., no value is available).
-
doNext
public boolean doNext()
The callback method called in thenext
method.- Returns:
false
iff it the combinator has been exhausted.
-
initialize
public void initialize(java.util.List<ru.ispras.testbase.knowledge.iterator.Iterator<T>> iterators)
- Specified by:
initialize
in interfaceCombinator<T>
-
init
public void init()
- Specified by:
init
in interfaceru.ispras.testbase.knowledge.iterator.Iterator<T>
-
hasValue
public boolean hasValue()
- Specified by:
hasValue
in interfaceru.ispras.testbase.knowledge.iterator.Iterator<T>
-
value
public java.util.List<T> value()
- Specified by:
value
in interfaceru.ispras.testbase.knowledge.iterator.Iterator<T>
-
next
public void next()
- Specified by:
next
in interfaceru.ispras.testbase.knowledge.iterator.Iterator<T>
-
stop
public void stop()
- Specified by:
stop
in interfaceru.ispras.testbase.knowledge.iterator.Iterator<T>
-
clone
public ru.ispras.microtesk.test.sequence.combinator.CombinatorBase<T> clone()
- Specified by:
clone
in interfaceru.ispras.testbase.knowledge.iterator.Iterator<T>
- Overrides:
clone
in classjava.lang.Object
-
-