/** * 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 = new byte[0]; for (int i = 0; i < operands.length; i++) { byte[] opdata = operands[i].getBytes(); // Grow the array byte[] newdata = new byte[data.length + opdata.length]; System.arraycopy(data, 0, newdata, 0, data.length); System.arraycopy(opdata, 0, newdata, data.length, opdata.length); data = newdata; } // Add on the operator byte byte[] newdata = new byte[data.length + 3]; System.arraycopy(data, 0, newdata, 0, data.length); newdata[data.length] = !useAlternateCode() ? Token.FUNCTION.getCode() : Token.FUNCTION.getCode2(); IntegerHelper.getTwoBytes(function.getCode(), newdata, data.length + 1); 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 = new byte[0]; for (int i = 0; i < operands.length; i++) { byte[] opdata = operands[i].getBytes(); // Grow the array byte[] newdata = new byte[data.length + opdata.length]; System.arraycopy(data, 0, newdata, 0, data.length); System.arraycopy(opdata, 0, newdata, data.length, opdata.length); data = newdata; } // Add on the operator byte byte[] newdata = new byte[data.length + 3]; System.arraycopy(data, 0, newdata, 0, data.length); newdata[data.length] = !useAlternateCode() ? Token.FUNCTION.getCode() : Token.FUNCTION.getCode2(); IntegerHelper.getTwoBytes(function.getCode(), newdata, data.length + 1); return newdata; }
/** * Gets the token representation of this item in RPN * * @return the bytes applicable to this formula */ byte[] getBytes() { handleSpecialCases(); // Get the data for the operands - in the correct order ParseItem[] operands = getOperands(); byte[] data = new byte[0]; for (int i = 0 ; i < operands.length ; i++) { byte[] opdata = operands[i].getBytes(); // Grow the array byte[] newdata = new byte[data.length + opdata.length]; System.arraycopy(data, 0, newdata, 0, data.length); System.arraycopy(opdata, 0, newdata, data.length, opdata.length); data = newdata; } // Add on the operator byte byte[] newdata = new byte[data.length + 4]; System.arraycopy(data, 0, newdata, 0, data.length); newdata[data.length] = !useAlternateCode() ? Token.FUNCTIONVARARG.getCode() : Token.FUNCTIONVARARG.getCode2() ; newdata[data.length+1] = (byte) arguments; IntegerHelper.getTwoBytes(function.getCode(), newdata, data.length+2); return newdata; }
/** * Gets the token representation of this item in RPN * * @return the bytes applicable to this formula */ byte[] getBytes() { handleSpecialCases(); // Get the data for the operands - in the correct order ParseItem[] operands = getOperands(); byte[] data = new byte[0]; for (int i = 0 ; i < operands.length ; i++) { byte[] opdata = operands[i].getBytes(); // Grow the array byte[] newdata = new byte[data.length + opdata.length]; System.arraycopy(data, 0, newdata, 0, data.length); System.arraycopy(opdata, 0, newdata, data.length, opdata.length); data = newdata; } // Add on the operator byte byte[] newdata = new byte[data.length + 4]; System.arraycopy(data, 0, newdata, 0, data.length); newdata[data.length] = !useAlternateCode() ? Token.FUNCTIONVARARG.getCode() : Token.FUNCTIONVARARG.getCode2() ; newdata[data.length+1] = (byte) arguments; IntegerHelper.getTwoBytes(function.getCode(), newdata, data.length+2); return newdata; }
/** * Gets the token representation of this item in RPN * * @return the bytes applicable to this formula */ byte[] getBytes() { byte[] data = new byte[5]; data[0] = !useAlternateCode() ? Token.REF.getCode() : Token.REF.getCode2(); IntegerHelper.getTwoBytes(row, data, 1); int grcol = column; // Set the row/column relative bits if applicable if (rowRelative) { grcol |= 0x8000; } if (columnRelative) { grcol |= 0x4000; } IntegerHelper.getTwoBytes(grcol, data, 3); return data; }
/** * Gets the token representation of this item in RPN * * @return the bytes applicable to this formula */ byte[] getBytes() { byte[] data = new byte[5]; data[0] = !useAlternateCode() ? Token.REF.getCode() : Token.REF.getCode2(); IntegerHelper.getTwoBytes(row, data, 1); int grcol = column; // Set the row/column relative bits if applicable if (rowRelative) { grcol |= 0x8000; } if (columnRelative) { grcol |= 0x4000; } IntegerHelper.getTwoBytes(grcol, data, 3); return data; }
Token.AREA.getCode2();
Token.AREA.getCode2();