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

io.rocketbase.commons.exception.BaseValidationException Maven / Gradle / Ivy

The newest version!
package io.rocketbase.commons.exception;

import com.google.common.base.Joiner;

import java.util.Set;
import java.util.stream.Collectors;

public interface BaseValidationException> {
    Set> getErrors();

    /**
     * joins all error message to one string
* returns empty string when no errors exist */ default String getErrorsMessage() { if (getErrors() != null) { return Joiner.on("; ").skipNulls().join(getErrors().stream().map(e -> e.getMessage()).collect(Collectors.toList())); } return ""; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy