RandomUtil

public class RandomUtil

Class RandomUtil. Provides randomutil functionality for the Hytale server.

java.lang.Object > RandomUtil

Field Summary

thisOne

final int thisOne

Field thisOne.

index

final int index

Field index.

Method Detail

roll

static T roll (int roll, final T[] data, @Nonnull final int[] chances)

Method roll.

Parameters:
int roll
final T[] data
@Nonnull final int[] chances

AssertionError

public new AssertionError ("Reached end of roll(" + roll + ", " + Arrays.toString(data)

Method AssertionError.

Parameters:
"Reached end of roll(" + roll + "
" + Arrays.toString(data

rollInt

static int rollInt (int roll, final int[] data, @Nonnull final int[] chances)

Method rollInt.

Parameters:
int roll
final int[] data
@Nonnull final int[] chances

getSecureRandom

static SecureRandom getSecureRandom ()

Method getSecureRandom.

selectRandom

static T selectRandom (@Nonnull final T[] arr, @Nonnull final Random random)

Method selectRandom.

Parameters:
@Nonnull final T[] arr
@Nonnull final Random random

selectRandomOrNull

static T selectRandomOrNull (@Nonnull final T[] arr, @Nonnull final Random random)

Method selectRandomOrNull.

Parameters:
@Nonnull final T[] arr
@Nonnull final Random random