結果 : how to avoid multiple if else condition in java 8