title: condition based lombok building of objects
body: <p>So here is the existing code snippet written to build <code>Human</code>s ( as in <code>matrix</code> movie :) )</p>
  
  <pre><code>if (gender.equals("male")){
      return Human.builder()
          .gender('male')
          .name('abc')
          .speaks("english")
          .alive(true)
          .build();
  }else{
      return Human.builder()
          .gender('female')
          .name('abcd')
          .speaks("english")
          .alive(true)
          .build();    
  }
  </code></pre>
  
  <p>If you look, this code has lot of redundancy in attribute assignment which can be minimised. Now imagine 10 conditions like it (<em>here, its just 2!</em>), no matter what you try, it would eventually lead to ugly looking redundant code.</p>
  
  <p>I tried searching lot of resources online and couldn't find any way to build object as <a href="https://www.javatpoint.com/builder-design-pattern" rel="nofollow noreferrer">per builder design</a>. What i would like to achive here ( <em>to reduce code redundancy</em>) is something like below :</p>
  
  <pre><code>Human human = Human.builder()
              .speaks("english")
              .alive(true);
  
  if (gender.equals("male")){
          human = human    // or just human.gender('male').name('abc'); no assignment
          .gender('male')
          .name('abc');
  }else{
          human = human // or just human.gender('female').name('abcd'); no assignment
          .gender('female')
          .name('abcd');
  }            
  return human.build();
  </code></pre>
  
  <p>Is this possible via lombok or anyone knows a better way to <em>build</em> objects here? <br />
  If its worth it, i am on <code>drop-wizard</code></p>