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
);
}
}