org.apache.commons.lang.math
クラス RandomUtils

java.lang.Object
  拡張org.apache.commons.lang.math.RandomUtils

public class RandomUtils
extends Object

RandomUtils is a wrapper that supports all possible Random methods via the Math.random() method and its system-wide Random object.

導入されたバージョン:
2.0
バージョン:
$Id: RandomUtils.java,v 1.1.1.1 2004/02/13 10:02:05 hioki Exp $
作成者:
Henri Yandell
翻訳状況:
訳者募集中

フィールドの概要
static Random JVM_RANDOM
           
 
コンストラクタの概要
RandomUtils()
           
 
メソッドの概要
static boolean nextBoolean()
          Returns the next pseudorandom, uniformly distributed boolean value from the Math.random() sequence.
static boolean nextBoolean(Random rnd)
           
static double nextDouble()
          Synonymous to the Math.random() call.
static double nextDouble(Random rnd)
           
static float nextFloat()
          Returns the next pseudorandom, uniformly distributed float value between 0.0 and 1.0 from the Math.random() sequence.
static float nextFloat(Random rnd)
           
static int nextInt()
          Returns the next pseudorandom, uniformly distributed int value from the Math.random() sequence.
static int nextInt(int n)
          Returns a pseudorandom, uniformly distributed int value between 0 (inclusive) and the specified value (exclusive), from the Math.random() sequence.
static int nextInt(Random rnd)
           
static int nextInt(Random rnd, int n)
           
static long nextLong()
          Returns the next pseudorandom, uniformly distributed long value from the Math.random() sequence.
static long nextLong(Random rnd)
           
 
クラス java.lang.Object から継承したメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

フィールドの詳細

JVM_RANDOM

public static final Random JVM_RANDOM
コンストラクタの詳細

RandomUtils

public RandomUtils()
メソッドの詳細

nextInt

public static int nextInt()

Returns the next pseudorandom, uniformly distributed int value from the Math.random() sequence.

戻り値:
the random int

nextInt

public static int nextInt(Random rnd)

nextInt

public static int nextInt(int n)

Returns a pseudorandom, uniformly distributed int value between 0 (inclusive) and the specified value (exclusive), from the Math.random() sequence.

パラメータ:
n - the specified exclusive max-value
戻り値:
the random int

nextInt

public static int nextInt(Random rnd,
                          int n)

nextLong

public static long nextLong()

Returns the next pseudorandom, uniformly distributed long value from the Math.random() sequence.

戻り値:
the random long

nextLong

public static long nextLong(Random rnd)

nextBoolean

public static boolean nextBoolean()

Returns the next pseudorandom, uniformly distributed boolean value from the Math.random() sequence.

戻り値:
the random boolean

nextBoolean

public static boolean nextBoolean(Random rnd)

nextFloat

public static float nextFloat()

Returns the next pseudorandom, uniformly distributed float value between 0.0 and 1.0 from the Math.random() sequence.

戻り値:
the random float

nextFloat

public static float nextFloat(Random rnd)

nextDouble

public static double nextDouble()

Synonymous to the Math.random() call.

戻り値:
the random double

nextDouble

public static double nextDouble(Random rnd)


このドキュメントは、Ja-Jakartaにより訳されました。 コメントがある場合は report@jajakarta.orgまでお願いします。
Translated into Japanese by jajakarta.org. The original page is here.
Copyright (c) 2002-2003 - Apache Software Foundation