Class IntRangeClient
java.lang.Object
it.unimi.di.prog2.s14.IntRangeClient
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
IntRangeClient
private IntRangeClient().
-
-
Method Details
-
printIterationsFirstLast
Prints a description of an iterator on integers.Prints the total number of iterations, if such number is positive, it also prints the first iterated value and, if it is different from it, the last one.
- Parameters:
it- the iterator, mast not benull.
-
main
A method to test theIntRangeclass.This methods reads the parameters of an
IntRangefrom the lines in the standard input in the formcommand value, where the command is:Fto set the from value of the range.Tto set the to value of the range.Sto set the step of the range.
Commands can be repeated, the last value is the one that is considered. Once the input is exhausted, the method emits the integers in the range in the standard output.
- Parameters:
args- not used.
-