Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 356EB200C7E for ; Tue, 23 May 2017 15:12:52 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 342E0160BE8; Tue, 23 May 2017 13:12:52 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id E3304160BC3 for ; Tue, 23 May 2017 15:12:49 +0200 (CEST) Received: (qmail 40672 invoked by uid 500); 23 May 2017 13:12:49 -0000 Mailing-List: contact notifications-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@commons.apache.org Delivered-To: mailing list notifications@commons.apache.org Received: (qmail 40585 invoked by uid 99); 23 May 2017 13:12:48 -0000 Received: from Unknown (HELO svn01-us-west.apache.org) (209.188.14.144) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 23 May 2017 13:12:48 +0000 Received: from svn01-us-west.apache.org (localhost [127.0.0.1]) by svn01-us-west.apache.org (ASF Mail Server at svn01-us-west.apache.org) with ESMTP id 9844A3A1965 for ; Tue, 23 May 2017 13:12:47 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1012767 [3/39] - in /websites/production/commons/content/proper/commons-text: ./ apidocs/ apidocs/org/apache/commons/text/ apidocs/org/apache/commons/text/class-use/ apidocs/org/apache/commons/text/diff/ apidocs/org/apache/commons/text/dif... Date: Tue, 23 May 2017 13:12:45 -0000 To: notifications@commons.apache.org From: chtompki@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20170523131247.9844A3A1965@svn01-us-west.apache.org> archived-at: Tue, 23 May 2017 13:12:52 -0000 Modified: websites/production/commons/content/proper/commons-text/apidocs/org/apache/commons/text/StrSubstitutor.html ============================================================================== --- websites/production/commons/content/proper/commons-text/apidocs/org/apache/commons/text/StrSubstitutor.html (original) +++ websites/production/commons/content/proper/commons-text/apidocs/org/apache/commons/text/StrSubstitutor.html Tue May 23 13:12:41 2017 @@ -4,7 +4,7 @@ -StrSubstitutor (Apache Commons Text 1.1-SNAPSHOT API) +StrSubstitutor (Apache Commons Text 1.1 API) @@ -12,7 +12,7 @@ @@ -12,7 +12,7 @@ @@ -12,7 +12,7 @@ @@ -12,7 +12,7 @@ + + + + + + + + + +
+
org.apache.commons.text
+

Interface TextRandomProvider

+
+
+
+
    +
  • +
    +
    +
    public interface TextRandomProvider
    +

    + TextRandomProvider implementations are used by RandomStringGenerator + as a source of randomness. It is highly recommended that the + Apache Commons RNG + library be used to provide the random number generation. +

    + +

    + When using Java 8 or later, TextRandomProvider is a functional interface and + need not be explicitly implemented. For example: +

    +
    + 
    + UniformRandomProvider rng = RandomSource.create(...);
    + RandomStringGenerator gen = new RandomStringGenerator.Builder()
    +     .usingRandom(rng::nextInt)
    +     // additional builder calls as needed
    +     .build();
    + 
    + 
    +
    +
    Since:
    +
    1.1
    +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Method Summary

      + + + + + + + + + + +
      All Methods Instance Methods Abstract Methods 
      Modifier and TypeMethod and Description
      intnextInt(int max) +
      Generates an int value between 0 (inclusive) and the specified value + (exclusive).
      +
      +
    • +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        nextInt

        +
        int nextInt(int max)
        +
        Generates an int value between 0 (inclusive) and the specified value + (exclusive).
        +
        +
        Parameters:
        +
        max - Bound on the random number to be returned. Must be positive.
        +
        Returns:
        +
        a random int value between 0 (inclusive) and n (exclusive).
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + +

Copyright © 2014–2017 The Apache Software Foundation. All rights reserved.

+ + \ No newline at end of file