1 52 53 package freemarker.testcase.models; 54 55 import freemarker.template.*; 56 57 64 public class BooleanList1 implements TemplateSequenceModel { 65 66 private LegacyList cList; 67 68 69 public BooleanList1() { 70 cList = new LegacyList(); 71 cList.add( "false" ); 72 cList.add( "0" ); 73 cList.add(TemplateBooleanModel.FALSE); 74 cList.add(TemplateBooleanModel.TRUE); 75 cList.add(TemplateBooleanModel.TRUE); 76 cList.add(TemplateBooleanModel.TRUE); 77 cList.add(TemplateBooleanModel.FALSE); 78 } 79 80 83 public boolean hasNext() { 84 return cList.hasNext(); 85 } 86 87 90 public TemplateModel next() throws TemplateModelException { 91 return cList.next(); 92 } 93 94 97 public boolean isRewound() { 98 return cList.isRewound(); 99 } 100 101 104 public TemplateModel get(int i) throws TemplateModelException { 105 return cList.get(i); 106 } 107 108 111 public void rewind() { 112 cList.rewind(); 113 } 114 115 public int size() { 116 return cList.size(); 117 } 118 119 } 120 | Popular Tags |