Class DecimalDigitsIG

java.lang.Object
it.unimi.di.prog2.h15.dd.DecimalDigitsIG

public class DecimalDigitsIG extends Object
A class representing decimal digits of a long, endowed with a non zero digits iterator, based on the inner NonZeroDigitsGeneratorIG class
  • Field Details

    • number

      private final long number
  • Constructor Details

    • DecimalDigitsIG

      public DecimalDigitsIG(long number)
  • Method Details

    • nonZeroDigits

      public Iterator<Integer> nonZeroDigits()
      Returns a generator on from the least significant to the most significant non zero digits.
      Returns:
      the generator.
    • main

      public static void main(String[] args)
      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.