Package com.mindee.parsing
Class SummaryHelper
- java.lang.Object
-
- com.mindee.parsing.SummaryHelper
-
public final class SummaryHelper extends Object
Various static methods to help generate the prediction summaries.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T extends LineItemField>
StringarrayToString(List<T> lineItems, int[] columnSizes)
static <T> String
arrayToString(List<T> list, String delimiter)
Given a list of fields, return a string.static String
cleanSummary(String summaryToClean)
static String
formatAmount(Double amountValue)
static String
formatForDisplay(Boolean inputValue, Integer maxColSize)
Truncates a boolean string if it's too long for the requested width.static String
formatForDisplay(String inputValue, Integer maxColSize)
Truncates a string if it's too long for the requested width.static String
formatString(String str)
static String
lineSeparator(int[] columnSizes, String str)
Format an rST table line separator.
-
-
-
Method Detail
-
arrayToString
public static <T> String arrayToString(List<T> list, String delimiter)
Given a list of fields, return a string.
-
arrayToString
public static <T extends LineItemField> String 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.
-
-