diff options
author | Stephen Colebourne <scolebourne@apache.org> | 2011-03-04 16:07:14 +0000 |
---|---|---|
committer | Stephen Colebourne <scolebourne@apache.org> | 2011-03-04 16:07:14 +0000 |
commit | 0ca84735ad3df33dfb48e9e165db5cb689783869 (patch) | |
tree | 8b2bdcad1516be5fbde52eb696af7b4619f85346 /src/main/java/org/apache/commons/lang3/RandomStringUtils.java | |
parent | ef14f844cc62eec7a3c954429d4f2f4e389cb04a (diff) | |
download | apache-commons-lang-0ca84735ad3df33dfb48e9e165db5cb689783869.tar.gz |
Javadoc
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1078032 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/main/java/org/apache/commons/lang3/RandomStringUtils.java')
-rw-r--r-- | src/main/java/org/apache/commons/lang3/RandomStringUtils.java | 41 |
1 files changed, 21 insertions, 20 deletions
diff --git a/src/main/java/org/apache/commons/lang3/RandomStringUtils.java b/src/main/java/org/apache/commons/lang3/RandomStringUtils.java index b143002b4..9ea1cbf3b 100644 --- a/src/main/java/org/apache/commons/lang3/RandomStringUtils.java +++ b/src/main/java/org/apache/commons/lang3/RandomStringUtils.java @@ -17,8 +17,9 @@ package org.apache.commons.lang3; import java.util.Random; + /** - * <p>Operations for random <code>String</code>s.</p> + * <p>Operations for random {@code String}s.</p> * <p>Currently <em>private high surrogate</em> characters are ignored. * These are unicode characters that fall between the values 56192 (db80) * and 56319 (dbff) as we don't know how to handle them. @@ -46,9 +47,9 @@ public class RandomStringUtils { private static final Random RANDOM = new Random(); /** - * <p><code>RandomStringUtils</code> instances should NOT be constructed in + * <p>{@code RandomStringUtils} instances should NOT be constructed in * standard programming. Instead, the class should be used as - * <code>RandomStringUtils.random(5);</code>.</p> + * {@code RandomStringUtils.random(5);}.</p> * * <p>This constructor is public to permit tools that require a JavaBean instance * to operate.</p> @@ -77,7 +78,7 @@ public class RandomStringUtils { * specified.</p> * * <p>Characters will be chosen from the set of characters whose - * ASCII value is between <code>32</code> and <code>126</code> (inclusive).</p> + * ASCII value is between {@code 32} and {@code 126} (inclusive).</p> * * @param count the length of random string to create * @return the random string @@ -136,9 +137,9 @@ public class RandomStringUtils { * characters as indicated by the arguments.</p> * * @param count the length of random string to create - * @param letters if <code>true</code>, generated string will include + * @param letters if {@code true}, generated string will include * alphabetic characters - * @param numbers if <code>true</code>, generated string will include + * @param numbers if {@code true}, generated string will include * numeric characters * @return the random string */ @@ -156,9 +157,9 @@ public class RandomStringUtils { * @param count the length of random string to create * @param start the position in set of chars to start at * @param end the position in set of chars to end before - * @param letters if <code>true</code>, generated string will include + * @param letters if {@code true}, generated string will include * alphabetic characters - * @param numbers if <code>true</code>, generated string will include + * @param numbers if {@code true}, generated string will include * numeric characters * @return the random string */ @@ -181,10 +182,10 @@ public class RandomStringUtils { * @param letters only allow letters? * @param numbers only allow numbers? * @param chars the set of chars to choose randoms from. - * If <code>null</code>, then it will use the set of all chars. + * If {@code null}, then it will use the set of all chars. * @return the random string * @throws ArrayIndexOutOfBoundsException if there are not - * <code>(end - start) + 1</code> characters in the set array. + * {@code (end - start) + 1} characters in the set array. */ public static String random(int count, int start, int end, boolean letters, boolean numbers, char[] chars) { return random(count, start, end, letters, numbers, chars, RANDOM); @@ -194,13 +195,13 @@ public class RandomStringUtils { * <p>Creates a random string based on a variety of options, using * supplied source of randomness.</p> * - * <p>If start and end are both <code>0</code>, start and end are set - * to <code>' '</code> and <code>'z'</code>, the ASCII printable + * <p>If start and end are both {@code 0}, start and end are set + * to {@code ' '} and {@code 'z'}, the ASCII printable * characters, will be used, unless letters and numbers are both - * <code>false</code>, in which case, start and end are set to - * <code>0</code> and <code>Integer.MAX_VALUE</code>. + * {@code false}, in which case, start and end are set to + * {@code 0} and {@code Integer.MAX_VALUE}. * - * <p>If set is not <code>null</code>, characters between start and + * <p>If set is not {@code null}, characters between start and * end are chosen.</p> * * <p>This method accepts a user-supplied {@link Random} @@ -215,12 +216,12 @@ public class RandomStringUtils { * @param letters only allow letters? * @param numbers only allow numbers? * @param chars the set of chars to choose randoms from. - * If <code>null</code>, then it will use the set of all chars. + * If {@code null}, then it will use the set of all chars. * @param random a source of randomness. * @return the random string * @throws ArrayIndexOutOfBoundsException if there are not - * <code>(end - start) + 1</code> characters in the set array. - * @throws IllegalArgumentException if <code>count</code> < 0. + * {@code (end - start) + 1} characters in the set array. + * @throws IllegalArgumentException if {@code count} < 0. * @since 2.0 */ public static String random(int count, int start, int end, boolean letters, boolean numbers, @@ -294,7 +295,7 @@ public class RandomStringUtils { * @param chars the String containing the set of characters to use, * may be null * @return the random string - * @throws IllegalArgumentException if <code>count</code> < 0. + * @throws IllegalArgumentException if {@code count} < 0. */ public static String random(int count, String chars) { if (chars == null) { @@ -313,7 +314,7 @@ public class RandomStringUtils { * @param chars the character array containing the set of characters to use, * may be null * @return the random string - * @throws IllegalArgumentException if <code>count</code> < 0. + * @throws IllegalArgumentException if {@code count} < 0. */ public static String random(int count, char[] chars) { if (chars == null) { |