AMPLOutput ========== .. java:package:: com.ampl :noindex: .. java:type:: public class AMPLOutput Captures an AMPL message together with its kind, as fetched from the underlying modelling system. Fields ------ error ^^^^^ .. java:field:: AMPLException error :outertype: AMPLOutput errors ^^^^^^ .. java:field:: static String errors :outertype: AMPLOutput isErrorOrWarning ^^^^^^^^^^^^^^^^ .. java:field:: boolean isErrorOrWarning :outertype: AMPLOutput isWarning ^^^^^^^^^ .. java:field:: boolean isWarning :outertype: AMPLOutput kind ^^^^ .. java:field:: String kind :outertype: AMPLOutput kindEnum ^^^^^^^^ .. java:field:: Kind kindEnum :outertype: AMPLOutput message ^^^^^^^ .. java:field:: String message :outertype: AMPLOutput source ^^^^^^ .. java:field:: Source source :outertype: AMPLOutput warnings ^^^^^^^^ .. java:field:: static final String[] warnings :outertype: AMPLOutput Constructors ------------ AMPLOutput ^^^^^^^^^^ .. java:constructor:: AMPLOutput(String kind, String message, Source s) :outertype: AMPLOutput Constructor :param kind: Kind of message as per AMPL -b option :param message: Message contents Methods ------- getError ^^^^^^^^ .. java:method:: AMPLException getError() :outertype: AMPLOutput Get the error captured by this AMPLOutput. :throws ClassCastException: If called on a message which does not represent an error getKind ^^^^^^^ .. java:method:: public Kind getKind() :outertype: AMPLOutput getMessage ^^^^^^^^^^ .. java:method:: public String getMessage() :outertype: AMPLOutput :return: The message isBreak ^^^^^^^ .. java:method:: Boolean isBreak() :outertype: AMPLOutput Returns true if the message is a recovery from break `kind=break...` :return: True if the message is a break (AMPL has been interrupted) isErrorOrWarning ^^^^^^^^^^^^^^^^ .. java:method:: boolean isErrorOrWarning() :outertype: AMPLOutput isExit ^^^^^^ .. java:method:: Boolean isExit() :outertype: AMPLOutput Returns true if the message is an exit message `kind=exit...` :return: True if the message is an exit (AMPL has quit) isInvalidSubscript ^^^^^^^^^^^^^^^^^^ .. java:method:: boolean isInvalidSubscript() :outertype: AMPLOutput isOption ^^^^^^^^ .. java:method:: Boolean isOption() :outertype: AMPLOutput Returns true if the message is an option `kind=option...` isPrompt ^^^^^^^^ .. java:method:: Boolean isPrompt() :outertype: AMPLOutput Returns true if the message is any prompt `kind=prompt...` :return: True if the message is a prompt isWaiting ^^^^^^^^^ .. java:method:: Boolean isWaiting() :outertype: AMPLOutput Returns true if AMPL is waiting for a statement delimiter (;) `kind=prompt2` :return: True if AMPL is waiting for the end of a statement isWarning ^^^^^^^^^ .. java:method:: boolean isWarning() :outertype: AMPLOutput toString ^^^^^^^^ .. java:method:: @Override public String toString() :outertype: AMPLOutput Get the string representation of this output, in the form: ```kind`: `message```