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

io.sphere.sdk.client.ValidationE Maven / Gradle / Ivy

There is a newer version: 1.0.0-M12
Show newest version
package io.sphere.sdk.client;

import io.sphere.sdk.utils.Validation;

/** Validation with the error type being {@link io.sphere.sdk.client.SphereClientException}. */
public final class ValidationE extends Validation {

    //TODO make private
    public ValidationE(T value, SphereClientException exception) {
        super(value, exception);
    }

    /**
     * Creates a new erroneous result.
     * @param exception the error of the result
     * @param  the type of the possible value, but absent value
     * @return the result
     */
    public static  ValidationE error(SphereClientException exception) {
        return new ValidationE<>(null, exception);
    }
}





© 2015 - 2025 Weber Informatics LLC | Privacy Policy