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

io.mstream.trader.commons.validation.ValidationErrorFactoryImpl Maven / Gradle / Ivy

The newest version!
package io.mstream.trader.commons.validation;


public class ValidationErrorFactoryImpl implements ValidationErrorFactory {

    public ValidationError create(
            ValidationErrorDescription descriptionFormat,
            String... tokens
    ) {
        String name = descriptionFormat.name();
        String description = String.format(
                descriptionFormat.getDescriptionFormat(),
                (Object[]) tokens
        );
        return new ValidationError(
                name,
                description
        );
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy