Java ThreadLocalRandom randomPer(long num, long divisor)

Here you can find the source of randomPer(long num, long divisor)

Description

random Per

License

Apache License

Declaration

public static boolean randomPer(long num, long divisor) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

import java.util.concurrent.ThreadLocalRandom;

public class Main {

    public static boolean randomPer(long num, long divisor) {
        return ThreadLocalRandom.current().nextLong(0, divisor) < num;
    }/*ww w .  j a  v  a2  s  . c  o  m*/
}

Related

  1. randomIntegerList(int min, int max, int minLength, int maxLength)
  2. randomLongs(final long count, final long min, final long max)
  3. randomLongsNonDuplicates(final long count, final long min, final long max)
  4. randomNum(int min, int max)
  5. randomNums(int min, int max, int count)
  6. randomReal(float range)
  7. randomSeed()
  8. randomString()
  9. RandomString(int length)