Package it.unimi.di.prog2.h15.dd
package it.unimi.di.prog2.h15.dd
Codice relativo alla lezione 14 (implementazione degli iteratori) per maggiori dettagli si veda
il diario del corso.
In this package there are several variants of a DecimalDigits
, a class that can be used to compute the digits of the
decimal expansion of a given number.
All the variants are endowed in addition with an iterator (that is a method that returns a generator in Lisokv's parlance) on non zero digits; the variants corrspond to various possibilities with regard to the implementation style of the generator:
DecimalDigitsEG
based on the external classNonZeroDigitsGenerator
,DecimalDigitsNSG
based on a nested static class,DecimalDigitsIG
based on an inner class,DecimalDigitsAG
based on an anonymos class.
-
ClassDescriptionA class representing decimal digits of a long.A class representing decimal digits of a long, endowed with a non zero digits iterator, based on an anonymos class.A class representing decimal digits of a long, endowed with a non zero digits iterator, based on the external
NonZeroDigitsGenerator
class.A class representing decimal digits of a long, endowed with a non zero digits iterator, based on the innerNonZeroDigitsGeneratorIG
classA class representing decimal digits of a long, endowed with a non zero digits iterator, based on the nested staticNonZeroDigitsGeneratorNS
class.A nested static class implementing the genrator.