Package it.unimi.di.prog2.h15
Class NonZeroDigitsGenerator
java.lang.Object
it.unimi.di.prog2.h15.NonZeroDigitsGenerator
A generator returning the non zero digits of a long from the least to the most significant one.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate long
The remaining digits to return (except possibly for the trailing zeroes). -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
NonZeroDigitsGenerator
(long number) Creates a new generator for the given number. -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.Iterator
forEachRemaining, remove
-
Field Details
-
remaining
private long remainingThe remaining digits to return (except possibly for the trailing zeroes).
-
-
Constructor Details
-
NonZeroDigitsGenerator
protected NonZeroDigitsGenerator(long number) Creates a new generator for the given number.- Parameters:
number
- the number.
-
-
Method Details