Class MarkFromCollectionProposer
Object
org.anchoranalysis.bean.AnchorBean<B>
org.anchoranalysis.bean.initializable.InitializableBean<T,MarksInitialization>
org.anchoranalysis.mpp.bean.MarksBean<T>
org.anchoranalysis.mpp.bean.proposer.ProposerBean<MarkFromCollectionProposer>
org.anchoranalysis.mpp.bean.proposer.MarkFromCollectionProposer
- All Implemented Interfaces:
CompatibleWithMark
public abstract class MarkFromCollectionProposer extends ProposerBean<MarkFromCollectionProposer> implements CompatibleWithMark
An abstract base class for proposing a selection of a single mark from a collection of marks.
-
Constructor Summary
Constructors Constructor Description MarkFromCollectionProposer() -
Method Summary
Modifier and Type Method Description abstract Optional<Mark>selectMarkFrom(MarkCollection marks, ProposerContext context)Selects a mark from a collection of marks.Methods inherited from class org.anchoranalysis.bean.initializable.InitializableBean
getInitialization, getLogger, getPropertyInitializer, initialize, initializeRecursive, initRecursiveWithInitializer, isInitialized, onInitializationMethods inherited from class org.anchoranalysis.bean.AnchorBean
checkMisconfigured, describeBean, describeChildren, duplicateBean, fields, findFieldsOfClass, getBeanName, getLocalPath, localise, toString
-
Constructor Details
-
MarkFromCollectionProposer
public MarkFromCollectionProposer()
-
-
Method Details
-
selectMarkFrom
public abstract Optional<Mark> selectMarkFrom(MarkCollection marks, ProposerContext context) throws ProposalAbnormalFailureExceptionSelects a mark from a collection of marks.- Parameters:
marks- the collection of marks to select fromcontext- the context for the proposal- Returns:
- an Optional containing the selected Mark, or empty if no selection is made
- Throws:
ProposalAbnormalFailureException- if the selection process fails abnormally
-