/** * Parses the encoded column specifications and returns a ColumnSpec object * that represents the string. Variables are expanded using the given * LayoutMap. * * @param encodedColumnSpec the encoded column specification * @param layoutMap expands layout column variables * * @return a ColumnSpec instance for the given specification * @throws NullPointerException if {@code encodedColumnSpec} or * {@code layoutMap} is {@code null} * * @see #decodeSpecs(String, LayoutMap) * * @since 1.2 */ public static ColumnSpec decode(String encodedColumnSpec, LayoutMap layoutMap) { FormUtils.assertNotBlank(encodedColumnSpec, "encoded column specification"); FormUtils.assertNotNull(layoutMap, "LayoutMap"); String trimmed = encodedColumnSpec.trim(); String lower = trimmed.toLowerCase(Locale.ENGLISH); return decodeExpanded(layoutMap.expand(lower, true)); }
/** * 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)); }
FormUtils.assertNotBlank(encodedDescription, "encoded form specification"); String[] token = TOKEN_SEPARATOR_PATTERN.split(encodedDescription); if (token.length == 0) {