Class RecursiveComposer<C extends Candidate,I extends CompositionComponent<C>,R extends Result>
- java.lang.Object
-
- org.processmining.specpp.componenting.system.link.AbstractBaseClass
-
- org.processmining.specpp.base.impls.RecursiveComposer<C,I,R>
-
- All Implemented Interfaces:
java.util.function.Consumer<C>,Composer<C,I,R>,FullComponentSystemUser,ComposerComponent<C,I,R>,HasComponentCollection,IsGlobalProvider,UsesGlobalComponentSystem,UsesLocalComponentSystem,Initializable
- Direct Known Subclasses:
AbstractPostponingComposer,FilteringComposer
public abstract class RecursiveComposer<C extends Candidate,I extends CompositionComponent<C>,R extends Result> extends AbstractBaseClass implements ComposerComponent<C,I,R>
-
-
Field Summary
Fields Modifier and Type Field Description protected Composer<C,I,R>childComposer
-
Constructor Summary
Constructors Constructor Description RecursiveComposer(ComposerComponent<C,I,R> childComposer)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract voidaccept(C c)Hook method which decides how to handle an incoming candidate.voidcandidatesAreExhausted()Hook method which is called when this composer will not receive any more candidates in the future as the connected proposer has been exhausted.protected voidforward(C c)RgenerateResult()Hook method where a final result is computed from the incrementally built up intermediate result.IgetIntermediateResult()Typically just returns the internally managed composition.booleanisFinished()Whether this composer has reached a state where it does not want to handle new candidates.-
Methods inherited from class org.processmining.specpp.componenting.system.link.AbstractBaseClass
collectTransitiveSubcomponents, getComponentCollection, getSubComponents, globalComponentSystem, init, initSelf, localComponentSystem, postSubComponentInit, preSubComponentInit, registerSubComponent, unregisterSubComponent
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.processmining.specpp.componenting.system.FullComponentSystemUser
collectTransitiveSubcomponents, connectLocalComponentSystem, getComponentCollection, registerSubComponent, unregisterSubComponent
-
Methods inherited from interface org.processmining.specpp.traits.Initializable
init
-
Methods inherited from interface org.processmining.specpp.componenting.traits.UsesGlobalComponentSystem
globalComponentSystem
-
Methods inherited from interface org.processmining.specpp.componenting.traits.UsesLocalComponentSystem
bridgeToChildren, localComponentSystem
-
-
-
-
Constructor Detail
-
RecursiveComposer
public RecursiveComposer(ComposerComponent<C,I,R> childComposer)
-
-
Method Detail
-
candidatesAreExhausted
public void candidatesAreExhausted()
Description copied from interface:ComposerHook method which is called when this composer will not receive any more candidates in the future as the connected proposer has been exhausted.- Specified by:
candidatesAreExhaustedin interfaceComposer<C extends Candidate,I extends CompositionComponent<C>,R extends Result>
-
isFinished
public boolean isFinished()
Description copied from interface:ComposerWhether this composer has reached a state where it does not want to handle new candidates.- Specified by:
isFinishedin interfaceComposer<C extends Candidate,I extends CompositionComponent<C>,R extends Result>- Returns:
- true iff no more candidates will be accepted
-
getIntermediateResult
public I getIntermediateResult()
Description copied from interface:ComposerTypically just returns the internally managed composition. Care must be taken, that this method may be called asynchronously.- Specified by:
getIntermediateResultin interfaceComposer<C extends Candidate,I extends CompositionComponent<C>,R extends Result>- Returns:
- the intermediate result
-
generateResult
public R generateResult()
Description copied from interface:ComposerHook method where a final result is computed from the incrementally built up intermediate result.- Specified by:
generateResultin interfaceComposer<C extends Candidate,I extends CompositionComponent<C>,R extends Result>- Returns:
- the final result
-
forward
protected void forward(C c)
-
-