public final class Series extends Object
This class is a final utility class and cannot be instantiated.
| Modifier and Type | Method and Description |
|---|---|
static LongStream |
fibonacci()
Creates and returns a new LongStream of the Fibonacci series: 0, 1, 1, 2, 3, 5, ...
|
static LongStream |
powersOfTwo()
Creates and returns a new LongStream of powers of two: 1, 2, ..., 2^63.
|
static LongStream |
powersOfTwoAndAdjacent()
Creates and returns a new LongStream of powers of two and adjacent values:
0, 1, 2, ..., 15, 16, 17, 31, 32, 33.
|
static LongStream |
primes()
Creates and returns a new LongStream of all the prime numbers: 2, 3, 5, 7, ...
|
public static LongStream powersOfTwo()
public static LongStream powersOfTwoAndAdjacent()
public static LongStream fibonacci()
public static LongStream primes()
Copyright © 2024. All rights reserved.