Class Response.Error

All Implemented Interfaces:
INode, IPos.IPosable, IResponse, IResponse.IError
Enclosing class:
Response

public static class Response.Error extends Pos.Printable implements IResponse.IError
Implements the IResponse.IError interface
  • Constructor Details

    • Error

      public Error(String errorMsg)
    • Error

      public Error(String errorMsg, IPos pos)
  • Method Details

    • isOK

      public boolean isOK()
      Description copied from interface: IResponse
      Returns true if the response is a SUCCESS response
      Specified by:
      isOK in interface IResponse
    • isError

      public boolean isError()
      Description copied from interface: IResponse
      Returns true if the response is an error response
      Specified by:
      isError in interface IResponse
    • errorMsg

      public String errorMsg()
      Description copied from interface: IResponse.IError
      Returns the error message held by this response
      Specified by:
      errorMsg in interface IResponse.IError
    • setPos

      public <T extends IPos.IPosable> T setPos(T t, IPos p)
      Setting the textual position of the command
    • accept

      public <T> T accept(IVisitor<T> v) throws IVisitor.VisitorException
      Description copied from interface: INode
      The accept method corresponding to IVisitor, to be implemented in each subclass as { return v.visit(this); }
      Specified by:
      accept in interface INode
      Type Parameters:
      T - the return type desired from the visit methods
      Parameters:
      v - the visitor class
      Returns:
      the value returned by the visit method
      Throws:
      IVisitor.VisitorException