![JAR search and dependency download from the Maven repository](/logo.png)
uk.ac.liv.pgb.analytica.lib.wrappedr.converters.RDataConversionResult Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of analytica-lib Show documentation
Show all versions of analytica-lib Show documentation
Library allowing generation of plots and data from proteomics and
metabolomics mass spectrometry data through the use of R and java
methods.
The newest version!
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package uk.ac.liv.pgb.analytica.lib.wrappedr.converters;
/**
*
* @author sperkins
*/
public final class RDataConversionResult {
/**
* The success message reported by the conversion, if any.
*/
private String successMessage;
/**
* The error message reported by the conversion, if any.
*/
private String errorMessage;
/**
* The exception reported by the conversion, if any.
*/
private Exception exception;
/**
* Private constructor to prevent external instantiation.
*/
private RDataConversionResult() { }
/**
* Creates an instance of this class denoting an unsuccessful conversion.
* @param errorMessage The error message.
* @param ex The exception reported by the conversion.
* @return The unsuccessful result object.
*/
public static RDataConversionResult error(final String errorMessage, final Exception ex) {
RDataConversionResult result = new RDataConversionResult();
result.errorMessage = errorMessage;
result.exception = ex;
return result;
}
/**
* Creates an instance of this class denoting a successful conversion.
* @param successMessage The success message.
* @return The success result object.
*/
public static RDataConversionResult success(final String successMessage) {
RDataConversionResult result = new RDataConversionResult();
result.successMessage = successMessage;
return result;
}
/**
* Gets the exception in this result, if any.
* @return The exception.
*/
public Exception getException() {
return this.exception;
}
/**
* Gets the success message in this result, if any.
* @return The success message.
*/
public String getSuccessMessage() {
return this.successMessage;
}
/**
* Gets the error message in this result, if any.
* @return The error message.
*/
public String getErrorMessage() {
return this.errorMessage;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy