Example usage for java.util Random longs

List of usage examples for java.util Random longs

Introduction

In this page you can find the example usage for java.util Random longs.

Prototype

public LongStream longs(long randomNumberOrigin, long randomNumberBound) 

Source Link

Document

Returns an effectively unlimited stream of pseudorandom long values, each conforming to the given origin (inclusive) and bound (exclusive).

Usage

From source file:com.idrene.emefana.repositories.RepositoriesTest.java

static Double price() {
    Random random = new Random();
    return Double.valueOf(random.longs(600000, 1000000).limit(5).findAny().getAsLong());

}