|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object edu.northwestern.at.utils.intcollections.IntRange
public class IntRange
A range of integers.
Field Summary | |
---|---|
int |
first
The first integer in the range. |
int |
last
The last integer in the range + 1. |
Constructor Summary | |
---|---|
IntRange(int first,
int last)
Constructs a new integer range. |
|
IntRange(java.lang.String str)
Constructs a new integer range from a string. |
Method Summary | |
---|---|
java.lang.Object |
clone()
Returns a copy of the range. |
java.lang.String |
toString()
Returns a string representation of the range. |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public int first
public int last
Constructor Detail |
---|
public IntRange(int first, int last)
first
- The first integer in the range.last
- The last integer in the range + 1.
java.lang.IllegalArgumentException
- If first >= last. public IntRange(java.lang.String str)
str
- The string.
java.lang.IllegalArgumentException
- If syntax error in string. Method Detail |
---|
public java.lang.String toString()
If last = first+1: "first".
If last > first+1: "first-xxx" where "xxx"is last-1.
toString
in class java.lang.Object
public java.lang.Object clone()
clone
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |