commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bay...@apache.org
Subject svn commit: r925967 - in /commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3: BooleanUtils.java StringUtils.java text/WordUtils.java
Date Mon, 22 Mar 2010 06:16:50 GMT
Author: bayard
Date: Mon Mar 22 06:16:49 2010
New Revision: 925967

URL: http://svn.apache.org/viewvc?rev=925967&view=rev
Log:
Vararging more methods.  StringUtils.getCommonPrefix, StringUtils.indexOfDifference, WordUtils.initials,
WordUtils.uncapitalize, WordUtils.capitalizeFully, WordUtils.capitalize, BooleanUtils.xor.
LANG-396

Modified:
    commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/BooleanUtils.java
    commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/StringUtils.java
    commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/text/WordUtils.java

Modified: commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/BooleanUtils.java
URL: http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/BooleanUtils.java?rev=925967&r1=925966&r2=925967&view=diff
==============================================================================
--- commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/BooleanUtils.java (original)
+++ commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/BooleanUtils.java Mon
Mar 22 06:16:49 2010
@@ -887,7 +887,7 @@ public class BooleanUtils {
      * @throws IllegalArgumentException if <code>array</code> is <code>null</code>
      * @throws IllegalArgumentException if <code>array</code> is empty.
      */
-    public static boolean xor(boolean[] array) {
+    public static boolean xor(boolean... array) {
         // Validates input
         if (array == null) {
             throw new IllegalArgumentException("The Array must not be null");
@@ -928,7 +928,7 @@ public class BooleanUtils {
      * @throws IllegalArgumentException if <code>array</code> is empty.
      * @throws IllegalArgumentException if <code>array</code> contains a <code>null</code>
      */
-    public static Boolean xor(Boolean[] array) {
+    public static Boolean xor(Boolean... array) {
         if (array == null) {
             throw new IllegalArgumentException("The Array must not be null");
         } else if (array.length == 0) {

Modified: commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/StringUtils.java
URL: http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/StringUtils.java?rev=925967&r1=925966&r2=925967&view=diff
==============================================================================
--- commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/StringUtils.java (original)
+++ commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/StringUtils.java Mon
Mar 22 06:16:49 2010
@@ -5761,7 +5761,7 @@ public class StringUtils {
      * @return the index where the strings begin to differ; -1 if they are all equal
      * @since 2.4
      */
-    public static int indexOfDifference(CharSequence[] css) {
+    public static int indexOfDifference(CharSequence... css) {
         if (css == null || css.length <= 1) {
             return INDEX_NOT_FOUND;
         }
@@ -5852,7 +5852,7 @@ public class StringUtils {
      * or if there is no common prefix.
      * @since 2.4
      */
-    public static String getCommonPrefix(String[] strs) {
+    public static String getCommonPrefix(String... strs) {
         if (strs == null || strs.length == 0) {
             return EMPTY;
         }

Modified: commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/text/WordUtils.java
URL: http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/text/WordUtils.java?rev=925967&r1=925966&r2=925967&view=diff
==============================================================================
--- commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/text/WordUtils.java (original)
+++ commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/text/WordUtils.java Mon
Mar 22 06:16:49 2010
@@ -201,7 +201,7 @@ public class WordUtils {
      * @see #capitalizeFully(String)
      * @since 2.1
      */
-    public static String capitalize(String str, char[] delimiters) {
+    public static String capitalize(String str, char... delimiters) {
         int delimLen = (delimiters == null ? -1 : delimiters.length);
         if (str == null || str.length() == 0 || delimLen == 0) {
             return str;
@@ -275,7 +275,7 @@ public class WordUtils {
      * @return capitalized String, <code>null</code> if null String input
      * @since 2.1
      */
-    public static String capitalizeFully(String str, char[] delimiters) {
+    public static String capitalizeFully(String str, char... delimiters) {
         int delimLen = (delimiters == null ? -1 : delimiters.length);
         if (str == null || str.length() == 0 || delimLen == 0) {
             return str;
@@ -331,7 +331,7 @@ public class WordUtils {
      * @see #capitalize(String)
      * @since 2.1
      */
-    public static String uncapitalize(String str, char[] delimiters) {
+    public static String uncapitalize(String str, char... delimiters) {
         int delimLen = (delimiters == null ? -1 : delimiters.length);
         if (str == null || str.length() == 0 || delimLen == 0) {
             return str;
@@ -464,7 +464,7 @@ public class WordUtils {
      * @see #initials(String)
      * @since 2.2
      */
-    public static String initials(String str, char[] delimiters) {
+    public static String initials(String str, char... delimiters) {
         if (str == null || str.length() == 0) {
             return str;
         }



Mime
View raw message