code: public void setParity(String parity) {
          if (ModbusUtil.isBlank(parity) || parity.equalsIgnoreCase("none")) {
              this.parity = AbstractSerialConnection.NO_PARITY;
          }
          else if (parity.equalsIgnoreCase("even")) {
              this.parity = AbstractSerialConnection.EVEN_PARITY;
          }
          else if (parity.equalsIgnoreCase("odd")) {
              this.parity = AbstractSerialConnection.ODD_PARITY;
          }
          else if (parity.equalsIgnoreCase("mark")) {
              this.parity = AbstractSerialConnection.MARK_PARITY;
          }
          else if (parity.equalsIgnoreCase("space")) {
              this.parity = AbstractSerialConnection.SPACE_PARITY;
          }
          else {
              this.parity = AbstractSerialConnection.NO_PARITY;
          }
      }
docs: Sets the parity schema from the given
  <tt>String</tt>.
  
  @param parity the new parity schema as <tt>String</tt>.