* span can be negative, resulting in a decresing sequence. *
* If span is 0, then the sequence will contain {start,
* end} if start != end, or just the singleton
* start if start == end.
*
* @param start The starting value.
* @param end The ending value.
* @param span The increment value.
*/
public Sequence(int start, int end, int span)
{
if (span == 0)
{
if (start != end)
sequence = new Integer[] { Integer.valueOf(start),
Integer.valueOf(end) };
else
sequence = new Integer[] { Integer.valueOf(start) };
}
else
{
LinkedList