commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject [1/2] [lang] [LANG-1253][GitHub issue #170] Add RandomUtils#nextBoolean() method. Closes #170.
Date Fri, 29 Jul 2016 05:43:52 GMT
Repository: commons-lang
Updated Branches:
  refs/heads/master bd9adbb63 -> 697329630


[LANG-1253][GitHub issue #170] Add RandomUtils#nextBoolean() method.
Closes #170.

Project: http://git-wip-us.apache.org/repos/asf/commons-lang/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-lang/commit/3899cc65
Tree: http://git-wip-us.apache.org/repos/asf/commons-lang/tree/3899cc65
Diff: http://git-wip-us.apache.org/repos/asf/commons-lang/diff/3899cc65

Branch: refs/heads/master
Commit: 3899cc6570bd9176c84ad2d5d14febc6c0ddd964
Parents: 1d1883f
Author: Gary Gregory <ggregory@apache.org>
Authored: Thu Jul 28 22:41:40 2016 -0700
Committer: Gary Gregory <ggregory@apache.org>
Committed: Thu Jul 28 22:41:40 2016 -0700

----------------------------------------------------------------------
 src/changes/changes.xml                                 |  1 +
 src/main/java/org/apache/commons/lang3/RandomUtils.java | 11 +++++++++++
 2 files changed, 12 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-lang/blob/3899cc65/src/changes/changes.xml
----------------------------------------------------------------------
diff --git a/src/changes/changes.xml b/src/changes/changes.xml
index 8887572..025ba34 100644
--- a/src/changes/changes.xml
+++ b/src/changes/changes.xml
@@ -46,6 +46,7 @@ The <action> type attribute can be add,update,fix,remove.
   <body>
 
   <release version="3.5" date="tba" description="tba">
+    <action issue="LANG-1253" type="add" dev="ggregory" due-to="adilek">[GitHub issue
#170] Add RandomUtils#nextBoolean() method</action>
     <action issue="LANG-1247" type="update" dev="chas" due-to="Benoit Wiart">FastDatePrinter
generates extra Date objects</action>
     <action issue="LANG-1018" type="fix" dev="pschumacher" due-to="Nick Manley">Fix
precision loss on NumberUtils.createNumber(String)</action>
     <action issue="LANG-1229" type="update" dev="pschumacher" due-to="Ruslan Cheremin">HashCodeBuilder.append(Object,Object)
is too big to be inlined, which prevents whole builder to be scalarized</action>

http://git-wip-us.apache.org/repos/asf/commons-lang/blob/3899cc65/src/main/java/org/apache/commons/lang3/RandomUtils.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/lang3/RandomUtils.java b/src/main/java/org/apache/commons/lang3/RandomUtils.java
index 594fe3f..a1fad2a 100644
--- a/src/main/java/org/apache/commons/lang3/RandomUtils.java
+++ b/src/main/java/org/apache/commons/lang3/RandomUtils.java
@@ -49,6 +49,17 @@ public class RandomUtils {
 
     /**
      * <p>
+     * Returns a random boolean value
+     * </p>
+     * 
+     * @return the random boolean
+     */
+    public static boolean nextBoolean() {
+        return RANDOM.nextBoolean();
+    }
+    
+    /**
+     * <p>
      * Creates an array of random bytes.
      * </p>
      * 


Mime
View raw message