Java ThreadLocalRandom randomLongs(final long count, final long min, final long max)

Here you can find the source of randomLongs(final long count, final long min, final long max)

Description

random Longs

License

Apache License

Declaration

public static long[] randomLongs(final long count, final long min, final long max) 

Method Source Code

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

import java.util.Random;

import java.util.concurrent.ThreadLocalRandom;

public class Main {
    public static long[] randomLongs(final long count, final long min, final long max) {

        final Random rand = ThreadLocalRandom.current();

        //TODO test for max and minimum values
        final long[] randomNum = rand.longs(count, min, max + 1).toArray();
        return randomNum;
    }/*from w w w.  ja va  2 s .  c o m*/
}

Related

  1. randomInRange(int min, int max)
  2. randomInt()
  3. randomInt(int bound)
  4. randomInteger(int min, int max)
  5. randomIntegerList(int min, int max, int minLength, int maxLength)
  6. randomLongsNonDuplicates(final long count, final long min, final long max)
  7. randomNum(int min, int max)
  8. randomNums(int min, int max, int count)
  9. randomPer(long num, long divisor)