Class RomanNumberFactory.RomanDigit

  • Enclosing class:
    RomanNumberFactory

    private static class RomanNumberFactory.RomanDigit
    extends java.lang.Object
    Helper class for Roman Digits
    • Field Summary

      Fields 
      Modifier and Type Field Description
      char digit
      part of a roman number
      boolean pre
      can the digit be used as a prefix
      int value
      value of the roman digit
    • Constructor Summary

      Constructors 
      Constructor Description
      RomanDigit​(char digit, int value, boolean pre)
      Constructs a roman digit
    • Method Summary

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • digit

        public char digit
        part of a roman number
      • value

        public int value
        value of the roman digit
      • pre

        public boolean pre
        can the digit be used as a prefix
    • Constructor Detail

      • RomanDigit

        RomanDigit​(char digit,
                   int value,
                   boolean pre)
        Constructs a roman digit
        Parameters:
        digit - the roman digit
        value - the value
        pre - can it be used as a prefix