Class GeneralFormatter


  • public class GeneralFormatter
    extends java.lang.Object
    This class provides several static convenience functions for formatting various types of information such as a time frame.

    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void appendDayType​(java.lang.StringBuffer str, double total, boolean shorthand)  
      private static void appendFrame​(java.lang.StringBuffer str, double num, java.lang.String frame, boolean do_round, boolean append_plural_s)
      Appends a frame of time onto the given StringBuffer.
      static void appendHourType​(java.lang.StringBuffer str, double total, boolean shorthand)  
      static void appendMinuteType​(java.lang.StringBuffer str, double total, boolean shorthand)  
      static void appendWeekType​(java.lang.StringBuffer str, double total, boolean shorthand)
      Appends time frame representation information into the given StringBuffer for various types of visual time frame formats.
      • Methods inherited from class java.lang.Object

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

      • GeneralFormatter

        public GeneralFormatter()
    • Method Detail

      • appendFrame

        private static void appendFrame​(java.lang.StringBuffer str,
                                        double num,
                                        java.lang.String frame,
                                        boolean do_round,
                                        boolean append_plural_s)
        Appends a frame of time onto the given StringBuffer. This is used to construct a string representing the current time frame.
      • appendWeekType

        public static void appendWeekType​(java.lang.StringBuffer str,
                                          double total,
                                          boolean shorthand)
        Appends time frame representation information into the given StringBuffer for various types of visual time frame formats.
      • appendDayType

        public static void appendDayType​(java.lang.StringBuffer str,
                                         double total,
                                         boolean shorthand)
      • appendHourType

        public static void appendHourType​(java.lang.StringBuffer str,
                                          double total,
                                          boolean shorthand)
      • appendMinuteType

        public static void appendMinuteType​(java.lang.StringBuffer str,
                                            double total,
                                            boolean shorthand)