title: if condition to check if only one variable is set of the four variables at any point in JAVA
body: <p>I want to display an error if more than one of the four variables is set...
  In Java..this is what I came up with..</p>
  
  <pre><code>if( (isAset() &amp;&amp; isBset()) || (isBset() &amp;&amp; isCset()) || (isCset() &amp;&amp; isDset()) || (isDset() &amp;&amp; isAset()) )
      attri.greedySelectionException(..);  
  </code></pre>
  
  <p>I wanted to check if there is a better way of doing this..?</p>