All Downloads are FREE. Search and download functionalities are using the official Maven repository.

colesico.framework.dslvalidator.commands.ForEachChain Maven / Gradle / Ivy

There is a newer version: 5.3.0
Show newest version
package colesico.framework.dslvalidator.commands;

import colesico.framework.dslvalidator.ValidationContext;

public class ForEachChain extends AbstractChain {

    @Override
    public void execute(ValidationContext context) {
        Iterable values = context.getValue();
        int index = 0;
        for (Object val : values) {
            ValidationContext childContext = ValidationContext.ofChild(context, context.getSubject() + '[' + (index++) + ']', val);
            executeCommands(childContext);
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy