Class EnglishAlphabetNumbering


  • public class EnglishAlphabetNumbering
    extends java.lang.Object
    This class is responsible for converting integer numbers to their English alphabet letter representations.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String toLatinAlphabetNumber​(int number, boolean upperCase)
      Converts the given number to its English alphabet string representation.
      static java.lang.String toLatinAlphabetNumberLowerCase​(int number)
      Converts the given number to its English alphabet lowercase string representation.
      static java.lang.String toLatinAlphabetNumberUpperCase​(int number)
      Converts the given number to its English alphabet uppercase string representation.
      • Methods inherited from class java.lang.Object

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

      • ALPHABET_LOWERCASE

        protected static final char[] ALPHABET_LOWERCASE
      • ALPHABET_UPPERCASE

        protected static final char[] ALPHABET_UPPERCASE
    • Constructor Detail

      • EnglishAlphabetNumbering

        public EnglishAlphabetNumbering()
    • Method Detail

      • toLatinAlphabetNumberLowerCase

        public static java.lang.String toLatinAlphabetNumberLowerCase​(int number)
        Converts the given number to its English alphabet lowercase string representation. E.g. 1 will be converted to "a", 2 to "b", ..., 27 to "aa", and so on.
        Parameters:
        number - the number greater than zero to be converted
        Returns:
        English alphabet lowercase string representation of an integer
      • toLatinAlphabetNumberUpperCase

        public static java.lang.String toLatinAlphabetNumberUpperCase​(int number)
        Converts the given number to its English alphabet uppercase string representation. E.g. 1 will be converted to "A", 2 to "B", ..., 27 to "AA", and so on.
        Parameters:
        number - the number greater than zero to be converted
        Returns:
        English alphabet uppercase string representation of an integer
      • toLatinAlphabetNumber

        public static java.lang.String toLatinAlphabetNumber​(int number,
                                                             boolean upperCase)
        Converts the given number to its English alphabet string representation. E.g. for upperCase set to false, 1 will be converted to "a", 2 to "b", ..., 27 to "aa", and so on.
        Parameters:
        number - the number greater than zero to be converted
        upperCase - whether to use uppercase or lowercase alphabet
        Returns:
        English alphabet string representation of an integer