private RowSpec[] parseRowSpecs() { List encodedRowSpecs = split(source, 0); int rowCount = encodedRowSpecs.size(); RowSpec[] rowSpecs = new RowSpec[rowCount]; for (int i = 0; i < rowCount; i++) { String encodedSpec = (String) encodedRowSpecs.get(i); rowSpecs[i] = RowSpec.decodeExpanded(encodedSpec); } return rowSpecs; }
private RowSpec[] parseRowSpecs() { List encodedRowSpecs = split(source, 0); int rowCount = encodedRowSpecs.size(); RowSpec[] rowSpecs = new RowSpec[rowCount]; for (int i = 0; i < rowCount; i++) { String encodedSpec = (String) encodedRowSpecs.get(i); rowSpecs[i] = RowSpec.decodeExpanded(encodedSpec); } return rowSpecs; }
/** * Parses the encoded row specifications and returns a RowSpec object * that represents the string. Variables are expanded using the given * LayoutMap. * * @param encodedRowSpec the encoded column specification * @param layoutMap expands layout row variables * * @return a RowSpec instance for the given specification * @throws NullPointerException if {@code encodedRowSpec} or * {@code layoutMap} is {@code null} * * @see #decodeSpecs(String, LayoutMap) * * @since 1.2 */ public static RowSpec decode(String encodedRowSpec, LayoutMap layoutMap) { checkNotBlank(encodedRowSpec, "The encoded row specification must not be null, empty or whitespace."); checkNotNull(layoutMap, "The LayoutMap must not be null."); String trimmed = encodedRowSpec.trim(); String lower = trimmed.toLowerCase(Locale.ENGLISH); return decodeExpanded(layoutMap.expand(lower, false)); }
/** * Parses the encoded row specifications and returns a RowSpec object * that represents the string. Variables are expanded using the given * LayoutMap. * * @param encodedRowSpec the encoded column specification * @param layoutMap expands layout row variables * * @return a RowSpec instance for the given specification * @throws NullPointerException if {@code encodedRowSpec} or * {@code layoutMap} is {@code null} * * @see #decodeSpecs(String, LayoutMap) * * @since 1.2 */ public static RowSpec decode(String encodedRowSpec, LayoutMap layoutMap) { FormUtils.assertNotBlank(encodedRowSpec, "encoded row specification"); FormUtils.assertNotNull(layoutMap, "LayoutMap"); String trimmed = encodedRowSpec.trim(); String lower = trimmed.toLowerCase(Locale.ENGLISH); return decodeExpanded(layoutMap.expand(lower, false)); }