Class IntegerRange
-
- org.apache.tapestry5.commons.util.IntegerRange
-
- All Implemented Interfaces:
<>
public final class IntegerRange extends implements <>
Represents a sequence of integer values, either ascending or descending. The sequence is always inclusive (of the finish value).
-
-
Constructor Summary
Constructors Constructor Description IntegerRange(int start, int finish)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
obj)
Returns true if the other object is an IntegerRange with the same start and finish values.int
getFinish()
int
getStart()
int
hashCode()
<>
iterator()
The main puprose of a range object is to produce an Iterator.toString()
-
-
-
Constructor Detail
-
IntegerRange
public IntegerRange(int start, int finish)
-
-
Method Detail
-
getFinish
public int getFinish()
-
getStart
public int getStart()
-
toString
public toString()
- Overrides:
in class
-
iterator
public <> iterator()
The main puprose of a range object is to produce an Iterator. Since IntegerRange is iterable, it is useful with the Tapestry Loop component, but also with the Java for loop!- Specified by:
in interface
<>
-
hashCode
public int hashCode()
- Overrides:
in class
-
equals
public boolean obj)
Returns true if the other object is an IntegerRange with the same start and finish values.- Overrides:
in class
-
-