Class 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 -
Method Summary
Modifier and TypeMethodDescriptionselectMarkFrom
(MarkCollection marks, ProposerContext context) Selects a mark from a collection of marks.Methods inherited from class org.anchoranalysis.mpp.bean.MarksBean
initializerForMarksBeans
Methods inherited from class org.anchoranalysis.bean.initializable.InitializableBean
getInitialization, getLogger, getPropertyInitializer, initialize, initializeRecursive, initRecursiveWithInitializer, isInitialized, onInitialization
Methods inherited from class org.anchoranalysis.bean.AnchorBean
checkMisconfigured, describeBean, describeChildren, duplicateBean, fields, findFieldsOfClass, getBeanName, getLocalPath, localise, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.anchoranalysis.mpp.mark.CompatibleWithMark
isCompatibleWith
-
Constructor Details
-
MarkFromCollectionProposer
public MarkFromCollectionProposer()
-
-
Method Details
-
selectMarkFrom
public abstract Optional<Mark> selectMarkFrom(MarkCollection marks, ProposerContext context) throws ProposalAbnormalFailureException Selects 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
-