Function<Integer, Function<Integer, Function<Integer, Integer>>> calculation
= x -> y -> z -> x + y + z;
public class EnumTest {
Day day;
public EnumTest(Day day) {
this.day = day;
}
public void tellItLikeItIs() {
switch (day) {
case MONDAY:
System.out.println("Mondays are bad.");
break;
case FRIDAY:
System.out.println("Fridays are better.");
break;
case SATURDAY: case SUNDAY:
System.out.println("Weekends are best.");
break;
default:
System.out.println("Midweek days are so-so.");
break;
}
}
public static void main(String[] args) {
EnumTest firstDay = new EnumTest(Day.MONDAY);
firstDay.tellItLikeItIs();
EnumTest thirdDay = new EnumTest(Day.WEDNESDAY);
thirdDay.tellItLikeItIs();
EnumTest fifthDay = new EnumTest(Day.FRIDAY);
fifthDay.tellItLikeItIs();
EnumTest sixthDay = new EnumTest(Day.SATURDAY);
sixthDay.tellItLikeItIs();
EnumTest seventhDay = new EnumTest(Day.SUNDAY);
seventhDay.tellItLikeItIs();
}
}
<c:if test="${contract.getIsBlocked()!=true}">
<div class="col-sm-6">
<div class="panel panel-default">
<div class="panel-heading">Tariff list</div>
<div class="panel-body">
${tempId.clear()}
<c:forEach var="tariff" items="${allTariffs}" varStatus="loop">
<c:set var="t">${tempId.add(tariff.tariffId)}</c:set>
<c:if test="${contract.tariff==tariff}">
<h3>
<div class="radio">
<label>
<input type="radio" name="optionsRadios${loopOne.index}"
id="optionsRadios${loopOne.index}"
${loop.index} value="option${loop.index}" checked disabled>
<b>${tariff.title}</b>
</label>
</div>
</h3>
</c:if>
<c:if test="${contract.tariff!=tariff}">
<h3>
<div class="radio">
<label>
<input type="radio" name="optionsRadios${loopOne.index}"
id="optionsRadios${loopOne.index}"
${loop.index} value="option${loop.index}">
<b>${tariff.title}</b>
</label>
</div>
</h3>
</c:if>
</c:forEach>