commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From scolebou...@apache.org
Subject svn commit: r1099413 - /commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/tuple/Pair.java
Date Wed, 04 May 2011 11:13:17 GMT
Author: scolebourne
Date: Wed May  4 11:13:17 2011
New Revision: 1099413

URL: http://svn.apache.org/viewvc?rev=1099413&view=rev
Log:
Inline the Pair toString for performance, and specify the format

Modified:
    commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/tuple/Pair.java

Modified: commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/tuple/Pair.java
URL: http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/tuple/Pair.java?rev=1099413&r1=1099412&r2=1099413&view=diff
==============================================================================
--- commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/tuple/Pair.java (original)
+++ commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/tuple/Pair.java Wed May
 4 11:13:17 2011
@@ -157,14 +157,13 @@ public abstract class Pair<L, R> impleme
     }
 
     /**
-     * <p>Returns a String representation of this Pair as completed by
-     * {@link #formatTo(Formatter, int, int, int)}.</p>
+     * <p>Returns a String representation of this pair using the format {@code ($left,$right)}.</p>
      * 
      * @return a string describing this object, not null
      */
     @Override
     public String toString() {
-        return FormattableUtils.toString(this);
+        return new StringBuilder().append('(').append(getLeft()).append(',').append(getRight()).append(')').toString();
     }
 
     /**



Mime
View raw message