Package it.unimi.di.prog2.h15.dd
Class DecimalDigitsEG
java.lang.Object
it.unimi.di.prog2.h15.dd.DecimalDigitsEG
A class representing decimal digits of a long, endowed with a non zero digits iterator, based on
the external
NonZeroDigitsGenerator
class.-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
This method serves the only purpose to show an usage example of this class.Returns a generator on from the least significant to the most significant non zero digits.
-
Field Details
-
number
private final long number
-
-
Constructor Details
-
DecimalDigitsEG
public DecimalDigitsEG(long number)
-
-
Method Details
-
nonZeroDigits
Returns a generator on from the least significant to the most significant non zero digits.- Returns:
- the generator.
-
main
This method serves the only purpose to show an usage example of this class.It prints the digits of the given number.
- Parameters:
args
- the first parametr is the number.
-