Class GreekAlphabetNumbering


  • public class GreekAlphabetNumbering
    extends java.lang.Object
    This class is responsible for converting integer numbers to their Greek alphabet letter representations. We are aware of the fact that the original Greek numbering is different. See http://www.cogsci.indiana.edu/farg/harry/lan/grknum.htm#ancient but this isn't implemented yet; the main reason being the fact that we need a font that has the obsolete Greek characters qoppa and sampi. So we use standard 24 letter Greek alphabet
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      private static char getSymbolFontChar​(char unicodeChar)
      Converts a given greek unicode character code into the code of the corresponding char Symbol font.
      static java.lang.String toGreekAlphabetNumber​(int number, boolean upperCase)
      Converts the given number to its Greek alphabet string representation.
      static java.lang.String toGreekAlphabetNumber​(int number, boolean upperCase, boolean symbolFont)
      Converts the given number to its Greek alphabet string representation.
      static java.lang.String toGreekAlphabetNumberLowerCase​(int number)
      Converts the given number to its Greek alphabet lowercase string representation.
      static java.lang.String toGreekAlphabetNumberUpperCase​(int number)
      Converts the given number to its Greek 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

      • GreekAlphabetNumbering

        public GreekAlphabetNumbering()
    • Method Detail

      • toGreekAlphabetNumberLowerCase

        public static java.lang.String toGreekAlphabetNumberLowerCase​(int number)
        Converts the given number to its Greek alphabet lowercase string representation. E.g. 1 will be converted to a string consisting of a unicode character for greek small letter alpha, 2 - a string consisting of a unicode character for greek small letter beta, 25 - a string consisting of two unicode characters for greek small letter alpha, and so on.
        Parameters:
        number - the number greater than zero to be converted
        Returns:
        Greek alphabet lowercase string representation of an integer.
      • toGreekAlphabetNumberUpperCase

        public static java.lang.String toGreekAlphabetNumberUpperCase​(int number)
        Converts the given number to its Greek alphabet uppercase string representation. E.g. 1 will be converted to a string consisting of a unicode character for greek capital letter alpha, 2 - a string consisting of a unicode character for greek capital letter beta, 25 - a string consisting of two unicode characters for greek capital letter alpha, and so on.
        Parameters:
        number - the number greater than zero to be converted
        Returns:
        Greek alphabet uppercase string representation of an integer.
      • toGreekAlphabetNumber

        public static java.lang.String toGreekAlphabetNumber​(int number,
                                                             boolean upperCase)
        Converts the given number to its Greek alphabet string representation. E.g. for upperCase set to false, 1 will be converted to a string consisting of a unicode character for greek small letter alpha, 2 - a string consisting of a unicode character for greek small letter beta, 25 - a string consisting of two unicode characters for greek small letter alpha, and so on.
        Parameters:
        number - the number greater than zero to be converted
        upperCase - whether to use uppercase or lowercase alphabet
        Returns:
        Greek alphabet string representation of an integer.
      • toGreekAlphabetNumber

        public static java.lang.String toGreekAlphabetNumber​(int number,
                                                             boolean upperCase,
                                                             boolean symbolFont)
        Converts the given number to its Greek alphabet string representation. E.g. for upperCase set to false, 1 will be converted to a string consisting of a unicode character for greek small letter alpha if symbolFont is set to false, otherwise - a string consisting of the corresponding symbol code in Symbol standard font; 26 will be converted to a string consisting of two unicode characters: greek small letter alpha followed by greek small letter beta if symbolFont is set to false, otherwise - a string consisting of the corresponding sequence of symbol codes in Symbol standard font.
        Parameters:
        number - the number greater than zero to be converted
        upperCase - whether to use uppercase or lowercase alphabet
        symbolFont - if true, then the string representation will be returned ready to write it in Symbol font
        Returns:
        Greek alphabet string representation of an integer.
      • getSymbolFontChar

        private static char getSymbolFontChar​(char unicodeChar)
        Converts a given greek unicode character code into the code of the corresponding char Symbol font.
        Parameters:
        unicodeChar - original unicode char
        Returns:
        the corresponding symbol code in Symbol standard font