/** * Returns the numerical value as a string * * @return The numerical value of the formula as a string */ public String getContents() { if (error == null) { error = FormulaErrorCode.getErrorCode(errorCode); } return error != FormulaErrorCode.UNKNOWN ? error.getDescription() : "ERROR " + errorCode; }
/** * Constructor * * @param s the error constant */ public ErrorConstant(String s) { error = FormulaErrorCode.getErrorCode(s); }
/** * Gets the token representation of this item in RPN * * @return the bytes applicable to this formula */ byte[] getBytes() { byte[] data = new byte[2]; data[0] = Token.ERR.getCode(); data[1] = (byte) error.getCode(); return data; }
/** * Gets the cell reference as a string for this item * * @param buf the string buffer to populate */ public void getString(StringBuffer buf) { buf.append(FormulaErrorCode.REF.getDescription()); }
/** * Reads the ptg data from the array starting at the specified position * * @param data the RPN array * @param pos the current position in the array, excluding the ptg identifier * @return the number of bytes read */ public int read(byte[] data, int pos) { int code = data[pos]; error = FormulaErrorCode.getErrorCode(code); return 1; }
/** * Gets the token representation of this item in RPN * * @return the bytes applicable to this formula */ byte[] getBytes() { byte[] data = new byte[2]; data[0] = Token.ERR.getCode(); data[1] = (byte) error.getCode(); return data; }
/** * Abstract method implementation to get the string equivalent of this * token * * @param buf the string to append to */ public void getString(StringBuffer buf) { buf.append(error.getDescription()); }
/** * Returns the numerical value as a string * * @return The numerical value of the formula as a string */ public String getContents() { if (error == null) { error = FormulaErrorCode.getErrorCode(errorCode); } return error != FormulaErrorCode.UNKNOWN ? error.getDescription() : "ERROR " + errorCode; }
/** * Constructor * * @param s the error constant */ public ErrorConstant(String s) { error = FormulaErrorCode.getErrorCode(s); }
/** * Gets the cell reference as a string for this item * * @param buf the string buffer to populate */ public void getString(StringBuffer buf) { buf.append(FormulaErrorCode.REF.getDescription()); }
/** * Returns the numerical value as a string * * @return The numerical value of the formula as a string */ public String getContents() { if (error == null) { error = FormulaErrorCode.getErrorCode(errorCode); } return error != FormulaErrorCode.UNKNOWN ? error.getDescription() : "ERROR " + errorCode; }
/** * Reads the ptg data from the array starting at the specified position * * @param data the RPN array * @param pos the current position in the array, excluding the ptg identifier * @return the number of bytes read */ public int read(byte[] data, int pos) { int code = data[pos]; error = FormulaErrorCode.getErrorCode(code); return 1; }
/** * Abstract method implementation to get the string equivalent of this * token * * @param buf the string to append to */ public void getString(StringBuffer buf) { buf.append(error.getDescription()); }
/** * Returns the numerical value as a string * * @return The numerical value of the formula as a string */ public String getContents() { if (error == null) { error = FormulaErrorCode.getErrorCode(errorCode); } return error != FormulaErrorCode.UNKNOWN ? error.getDescription() : "ERROR " + errorCode; }