title: how to convert else if in java8
body: <p>How to change the below code to remove if-else and use Java8</p>
  <pre><code>List&lt;String&gt; list1;
  List&lt;String&gt; list2;
  List&lt;String&gt; list3;
  String str;
  if(list1.contains(str)){
      event.getMessage().setInvocationProperty(&quot;ABC&quot;,&quot;ABC1&quot;);
  }
  else if(list2.contains(str)){
      event.getMessage().setInvocationProperty(&quot;ABC2&quot;,&quot;ABC3&quot;);
  }
  else if(list3.contains(str)){
      event.getMessage().setInvocationProperty(&quot;ABC4&quot;,&quot;ABC5&quot;);
  }
  </code></pre>