org.apache.tapestry5.internal.util
Class IntegerRange
java.lang.Object
org.apache.tapestry5.internal.util.IntegerRange
- All Implemented Interfaces:
- Iterable<Integer>
public final class IntegerRange
- extends Object
- implements Iterable<Integer>
Represents a sequence of integer values, either ascending or descending. The sequence is always inclusive (of the
finish value).
IntegerRange
public IntegerRange(int start,
int finish)
getFinish
public int getFinish()
getStart
public int getStart()
toString
public String toString()
- Overrides:
toString
in class Object
iterator
public Iterator<Integer> 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:
iterator
in interface Iterable<Integer>
hashCode
public int hashCode()
- Overrides:
hashCode
in class Object
equals
public boolean equals(Object obj)
- Returns true if the other object is an IntegerRange with the same start and finish values.
- Overrides:
equals
in class Object
Copyright © 2003-2012 The Apache Software Foundation.