| 1 |
/** |
| 2 |
* JNA-RInChI - Library for calling RInChI from Java |
| 3 |
* Copyright © 2022 Nikolay Kochev |
| 4 |
* <p> |
| 5 |
* This library is free software; you can redistribute it and/or |
| 6 |
* modify it under the terms of the GNU Lesser General Public |
| 7 |
* License as published by the Free Software Foundation; either |
| 8 |
* version 2.1 of the License, or (at your option) any later version. |
| 9 |
* <p> |
| 10 |
* This program is distributed in the hope that it will be useful, |
| 11 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 13 |
* GNU Lesser General Public License for more details. |
| 14 |
* <p> |
| 15 |
* You should have received a copy of the GNU Lesser General Public License |
| 16 |
* along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 17 |
*/ |
| 18 |
package io.github.dan2097.jnarinchi; |
| 19 |
|
| 20 |
/** |
| 21 |
* Abstract immutable data class for the output from a native RInChI library operation. |
| 22 |
* |
| 23 |
* @see RinchiOutput |
| 24 |
* @see RinchiKeyOutput |
| 25 |
* @see RinchiInputFromRinchiOutput |
| 26 |
* @see RinchiDecompositionOutput |
| 27 |
* @see FileTextOutput |
| 28 |
* @author Nikolay Kochev |
| 29 |
*/ |
| 30 |
public abstract class Output { |
| 31 |
private final Status status; |
| 32 |
private final int errorCode; |
| 33 |
private final String errorMessage; |
| 34 |
|
| 35 |
public Output(Status status, int errorCode, String errorMessage) { |
| 36 |
this.status = status; |
| 37 |
this.errorCode = errorCode; |
| 38 |
this.errorMessage = errorMessage; |
| 39 |
} |
| 40 |
|
| 41 |
public Status getStatus() { |
| 42 |
return status; |
| 43 |
} |
| 44 |
|
| 45 |
public int getErrorCode() { |
| 46 |
return errorCode; |
| 47 |
} |
| 48 |
|
| 49 |
public String getErrorMessage() { |
| 50 |
return errorMessage; |
| 51 |
} |
| 52 |
} |