Package it.unimi.di.prog2.h15.dd
Class DecimalDigitsIG
java.lang.Object
it.unimi.di.prog2.h15.dd.DecimalDigitsIG
A class representing decimal digits of a long, endowed with a non zero digits iterator, based on
the inner
NonZeroDigitsGeneratorIG
class-
Nested Class Summary
Modifier and TypeClassDescriptionprivate class
An inner class implementing the genrator. -
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
-
DecimalDigitsIG
public DecimalDigitsIG(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.
-