From 5d9141e206043aae96a427f0fc1cb03eada282ed Mon Sep 17 00:00:00 2001 From: Duncan Jones Date: Mon, 21 Apr 2014 08:18:43 +0000 Subject: [PATCH] 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 --- .../apache/commons/lang3/time/DurationFormatUtils.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/apache/commons/lang3/time/DurationFormatUtils.java b/src/main/java/org/apache/commons/lang3/time/DurationFormatUtils.java index 7d2418312..2f7242621 100644 --- a/src/main/java/org/apache/commons/lang3/time/DurationFormatUtils.java +++ b/src/main/java/org/apache/commons/lang3/time/DurationFormatUtils.java @@ -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 + /** + *

Converts a {@code long} to a {@code String} with optional + * zero padding.

+ * + * @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;