freemarker.template
Class NumericalRange

java.lang.Object
  |
  +--freemarker.template.NumericalRange
All Implemented Interfaces:
TemplateModel, TemplateSequenceModel

public class NumericalRange
extends java.lang.Object
implements TemplateSequenceModel

A class that represents a Range between two integers. inclusive of the end-points. It can be ascending or descending.

Author:
Jonathan Revusky

Constructor Summary
NumericalRange(int left, int right)
           
 
Method Summary
 TemplateModel get(int i)
          Retrieves the i-th template model in this sequence.
 boolean isEmpty()
           
 int size()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NumericalRange

public NumericalRange(int left,
                      int right)
Method Detail

get

public TemplateModel get(int i)
                  throws TemplateModelException
Description copied from interface: TemplateSequenceModel
Retrieves the i-th template model in this sequence.
Specified by:
get in interface TemplateSequenceModel

size

public int size()
Specified by:
size in interface TemplateSequenceModel
Following copied from interface: freemarker.template.TemplateSequenceModel
Returns:
the number of items in the list.

isEmpty

public boolean isEmpty()
Specified by:
isEmpty in interface TemplateModel
Following copied from interface: freemarker.template.TemplateModel
Returns:
true if this object is empty.