cdc.applic.factorization.Cutter Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of cdc-applic-factorization Show documentation
Show all versions of cdc-applic-factorization Show documentation
Applicabilities Factorization.
package cdc.applic.factorization;
import java.util.List;
import cdc.applic.expressions.Expression;
import cdc.applic.factorization.events.CutEvent;
import cdc.applic.factorization.handlers.CutHandler;
/**
* Cutter is used to cut objects that have an applicability.
*
* Given a target applicability, each object can be:
*
* - included when its applicability is a non empty subset of target applicability
*
- excluded when its applicability is a non empty subset of complement of target applicability
*
- cut when its applicability intersects both target applicability and its complement.
*
- degenerated when its applicability intersects neither target applicability nor its complement.
*
*
* @author Damien Carbonne
*/
public interface Cutter {
/**
* Cut the applicability of a list of objects in 2 parts.
*
* For each object in {@code objects}, when applicability of object:
*
* - is a non-empty subset of {@code targetApplicability}, invokes {@link CutHandler#processIncludeObjectApplicability(Object)}.
*
- is a non-empty subset of complement of {@code targetApplicability}, invokes {@link CutHandler#processExcludeObjectApplicability(Object)}.
*
- straddles {@code targetApplicability} and its complement, invokes {@link CutHandler#processCutObjectApplicability(Object, Expression, Expression)}.
*
- intersects neither {@code targetApplicability} nor its complement, invokes {@link CutHandler#processDegenerateObjectApplicability(Object)}.
*
*
* @param The object type.
* @param objects The objects.
* @param targetApplicability The target applicability.
* @param applicabilityExtractor The applicability extractor.
* @param features The features to apply.
* @param handler The event handler.
*/
public void cut(List extends T> objects,
Expression targetApplicability,
ApplicabilityExtractor super T> applicabilityExtractor,
FactorizationFeatures features,
CutHandler handler);
public List> cut(List extends T> objects,
Expression targetApplicability,
ApplicabilityExtractor super T> applicabilityExtractor,
FactorizationFeatures features);
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy