/** * Gets the token representation of this item in RPN * * @return the bytes applicable to this formula */ byte[] getBytes() { // Get the data for the operands ParseItem[] operands = getOperands(); byte[] data = operands[0].getBytes(); // Add on the operator byte byte[] newdata = new byte[data.length + 1]; System.arraycopy(data, 0, newdata, 0, data.length); newdata[data.length] = getToken().getCode(); return newdata; }
/** * Gets the token representation of this item in RPN * * @return the bytes applicable to this formula */ byte[] getBytes() { // Get the data for the operands ParseItem[] operands = getOperands(); byte[] data = operands[0].getBytes(); // Add on the operator byte byte[] newdata = new byte[data.length + 1]; System.arraycopy(data, 0, newdata, 0, data.length); newdata[data.length] = getToken().getCode(); return newdata; }