org.archifacts.integration.c4.model.ModelItemComputationRule Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of archifacts-c4-model Show documentation
Show all versions of archifacts-c4-model Show documentation
archifacts C4 Model integration
The newest version!
package org.archifacts.integration.c4.model;
import java.util.Set;
import java.util.function.Predicate;
import org.archifacts.core.model.Archifact;
import com.structurizr.model.ModelItem;
public final class ModelItemComputationRule implements Predicate, ComputationFunction {
private final Predicate predicate;
private final ComputationFunction computation;
ModelItemComputationRule(final Predicate predicate, final ComputationFunction computation) {
this.predicate = predicate;
this.computation = computation;
}
@Override
public boolean test(final ARCHIFACT archifact) {
return predicate.test(archifact);
}
@Override
public Set apply(final ARCHIFACT archifact, final C4ModelLookup lookup) {
return computation.apply(archifact, lookup);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy