Class SummaryHelper


  • public final class SummaryHelper
    extends Object
    Various static methods to help generate the prediction summaries.
    • Method Detail

      • cleanSummary

        public static String cleanSummary​(String summaryToClean)
      • formatAmount

        public static String formatAmount​(Double amountValue)
      • formatString

        public static String formatString​(String str)
      • arrayToString

        public static <T> String arrayToString​(List<T> list,
                                               String delimiter)
        Given a list of fields, return a string.
      • arrayToString

        public static <T extends LineItemFieldString arrayToString​(List<T> lineItems,
                                                                     int[] columnSizes)
      • formatForDisplay

        public static String formatForDisplay​(String inputValue,
                                              Integer maxColSize)
        Truncates a string if it's too long for the requested width.
      • formatForDisplay

        public static String formatForDisplay​(Boolean inputValue,
                                              Integer maxColSize)
        Truncates a boolean string if it's too long for the requested width.
      • lineSeparator

        public static String lineSeparator​(int[] columnSizes,
                                           String str)
        Format an rST table line separator.