@@ -0,0 +1,1254 @@
+package template.dom;%0A%0Aimport context.JustContext;%0A%0Aimport java.util.Objects;%0A%0A/**%0A * For-RangeComponent. It's just an option%0A * to be extended to an template engine.%0A * Created by liufengkai on 2017/7/20.%0A */%0Apublic class ForRangeComponent implements DomComponent %7B%0A%0A    private int startVal = 0, endVal = 0;%0A    private String block;%0A%0A    public ForRangeComponent(int startVal, int endVal, String block) %7B%0A        this.startVal = startVal;%0A        this.endVal = endVal;%0A        this.block = block;%0A    %7D%0A%0A    @Override%0A    public StringBuilder generateCode(JustContext context, StringBuilder builder) %7B%0A        // create local val%0A        String localVal = %22val%22 + Objects.hashCode(System.currentTimeMillis());%0A        return builder.append(%22for(int %22)%0A                .append(localVal)%0A                .append(%22=%22)%0A                .append(startVal)%0A                .append(localVal)%0A                .append(%22;%22)%0A                .append(%22%3C%22)%0A                .append(endVal)%0A                .append(%22;%22)%0A                .append(localVal)%0A                .append(%22++) %7B%22)%0A                .append(block)%0A                .append(%22%7D%22);%0A    %7D%0A%0A    @Override%0A    public boolean isValidate(JustContext context) %7B%0A        return context.contain(block);%0A    %7D%0A%7D%0A

update for-rangeComponent