Added Javadoc to clear checkstyle error
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1588857 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
fbb0f7f88c
commit
5d9141e206
|
@ -457,7 +457,15 @@ static String format(final Token[] tokens, final long years, final long months,
|
|||
return buffer.toString();
|
||||
}
|
||||
|
||||
// Helper method to simplify repetive code in format method above
|
||||
/**
|
||||
* <p>Converts a {@code long} to a {@code String} with optional
|
||||
* zero padding.</p>
|
||||
*
|
||||
* @param value the value to convert
|
||||
* @param padWithZeros whether to pad with zeroes
|
||||
* @param count the size to pad to (ignored if {@code padWithZeros} is false)
|
||||
* @return the string result
|
||||
*/
|
||||
private static String paddedValue(final long value, final boolean padWithZeros, final int count) {
|
||||
final String longString = Long.toString(value);
|
||||
return padWithZeros ? StringUtils.leftPad(longString, count, '0') : longString;
|
||||
|
|
Loading…
Reference in New Issue