diff --git a/src/main/java/org/apache/commons/lang3/tuple/Pair.java b/src/main/java/org/apache/commons/lang3/tuple/Pair.java index 059304c6a76..6be6316fe6e 100644 --- a/src/main/java/org/apache/commons/lang3/tuple/Pair.java +++ b/src/main/java/org/apache/commons/lang3/tuple/Pair.java @@ -253,13 +253,14 @@ public String toString() { /** * Formats the receiver using the given format. * - *

This uses {@link java.util.Formattable} to perform the formatting. Two variables may - * be used to embed the left and right elements. Use {@code %1$s} for the left - * element (key) and {@code %2$s} for the right element (value). - * The default format used by {@code toString()} is {@code (%1$s,%2$s)}.

+ *

+ * This uses {@link String#format(String, Object...)} to the format. Two variables may be used to embed the left and right elements. Use {@code %1$s} for + * the left element (key) and {@code %2$s} for the right element (value). + *

* - * @param format the format string, optionally containing {@code %1$s} and {@code %2$s}, not null + * @param format the format string, optionally containing {@code %1$s} and {@code %2$s}, not null. * @return the formatted string, not null + * @see String#format(String, Object...) */ public String toString(final String format) { return String.format(format, getLeft(), getRight());