title: if else condition in class constructor ... is it good practice?
body: <p>I have written a constructor and passing one boolean flag to decide which value to set to class variable. Code is as follows </p>
  
  <pre><code>public PDFParagraph(PDFPhrase phrase,boolean isRtl) {
              super(phrase);
              if(isRtl)
                      this.setAlignment(Element.ALIGN_RIGHT);
              else
                      this.setAlignment(Element.ALIGN_LEFT);
      }
  </code></pre>
  
  <p>Now I am confused and not sure if I shall add if...else conditions in constructor. Is it good style to set the class varible value? </p>
  
  <p>Thanks,
  Hanumant.</p>