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

fr.lirmm.boreal.util.validator.Validator Maven / Gradle / Ivy

The newest version!
package fr.lirmm.boreal.util.validator;

import java.util.Collection;

/**
 * @author Florent Tornil
 * 

* Validate a specific condition over the given elements * @param the type of the elements to be checked */ public interface Validator { /** * @param elements elements to check * @return true iff all the elements respect a implementation defined property */ default boolean check(Collection elements) { return elements.stream().allMatch(this::check); } /** * @param element element to check * @return true iff the element respect a implementation defined property */ boolean check(T element); }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy