/** * Applies a custom padding character to a given list of fields * * @param padding the padding to apply * @param positions the positions of the fields that should use the given padding character */ public void setPadding(char padding, int... positions) { for (int position : positions) { setPadding(position, padding); } }
/** * Applies a custom padding character to a given list of fields * * @param padding the padding to apply * @param names the names of the fields that should use the given padding character */ public void setPadding(char padding, String... names) { for (String name : names) { int position = indexOf(name); setPadding(position, padding); } }