
io.sphere.internal.util.ValidationE Maven / Gradle / Ivy
package io.sphere.internal.util;
import io.sphere.client.SphereClientException;
import net.jcip.annotations.Immutable;
/** Validation with the error type being {@link io.sphere.client.SphereClientException}. */
@Immutable
public final class ValidationE extends Validation {
private ValidationE(T value, SphereClientException exception) {
super(value, exception);
}
/** Creates a new successful result. */
public static ValidationE success(T value) {
return new ValidationE(value, null);
}
/** Creates a new erroneous result. */
public static ValidationE error(SphereClientException exception) {
return new ValidationE(null, exception);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy