Share via


SplittableRandom.NextInt Method

Definition

Overloads

NextInt(Int32, Int32)

Returns a pseudorandom int value between the specified origin (inclusive) and the specified bound (exclusive).

NextInt()

Returns a pseudorandom int value.

NextInt(Int32)

Returns a pseudorandom int value between zero (inclusive) and the specified bound (exclusive).

NextInt(Int32, Int32)

Returns a pseudorandom int value between the specified origin (inclusive) and the specified bound (exclusive).

[Android.Runtime.Register("nextInt", "(II)I", "", ApiSince=24)]
public int NextInt (int origin, int bound);
[<Android.Runtime.Register("nextInt", "(II)I", "", ApiSince=24)>]
member this.NextInt : int * int -> int

Parameters

origin
Int32

the least value returned

bound
Int32

the upper bound (exclusive)

Returns

a pseudorandom int value between the origin (inclusive) and the bound (exclusive)

Attributes

Remarks

Returns a pseudorandom int value between the specified origin (inclusive) and the specified bound (exclusive).

Java documentation for java.util.SplittableRandom.nextInt(int, int).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

NextInt()

Returns a pseudorandom int value.

[Android.Runtime.Register("nextInt", "()I", "", ApiSince=24)]
public int NextInt ();
[<Android.Runtime.Register("nextInt", "()I", "", ApiSince=24)>]
member this.NextInt : unit -> int

Returns

a pseudorandom int value

Attributes

Remarks

Returns a pseudorandom int value.

Java documentation for java.util.SplittableRandom.nextInt().

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

NextInt(Int32)

Returns a pseudorandom int value between zero (inclusive) and the specified bound (exclusive).

[Android.Runtime.Register("nextInt", "(I)I", "", ApiSince=24)]
public int NextInt (int bound);
[<Android.Runtime.Register("nextInt", "(I)I", "", ApiSince=24)>]
member this.NextInt : int -> int

Parameters

bound
Int32

the upper bound (exclusive). Must be positive.

Returns

a pseudorandom int value between zero (inclusive) and the bound (exclusive)

Attributes

Remarks

Returns a pseudorandom int value between zero (inclusive) and the specified bound (exclusive).

Java documentation for java.util.SplittableRandom.nextInt(int).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to