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

cz.mmsparams.api.http.TaskResult Maven / Gradle / Ivy

The newest version!
package cz.mmsparams.api.http;

public class TaskResult
{
    private final T result;
    private final Exception error;

    public T getResult()
    {
        return result;
    }

    public Exception getError()
    {
        return error;
    }

    public boolean hasResult()
    {
        return result != null;
    }

    public boolean hasError()
    {
        return error != null;
    }

    public TaskResult(T result)
    {
        super();
        this.result = result;
        this.error = null;
    }

    public TaskResult(Exception error)
    {
        super();
        this.result = null;
        this.error = error;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy