public class BigDecimalStream
extends java.lang.Object
BigDecimal
elements.Constructor and Description |
---|
BigDecimalStream() |
Modifier and Type | Method and Description |
---|---|
static java.util.stream.Stream<java.math.BigDecimal> |
range(java.math.BigDecimal startInclusive,
java.math.BigDecimal endExclusive,
java.math.BigDecimal step,
java.math.MathContext mathContext)
Returns a sequential ordered
Stream<BigDecimal> from startInclusive
(inclusive) to endExclusive (exclusive) by an incremental step . |
static java.util.stream.Stream<java.math.BigDecimal> |
range(double startInclusive,
double endExclusive,
double step,
java.math.MathContext mathContext)
Returns a sequential ordered
Stream<BigDecimal> from startInclusive
(inclusive) to endExclusive (exclusive) by an incremental step . |
static java.util.stream.Stream<java.math.BigDecimal> |
range(long startInclusive,
long endExclusive,
long step,
java.math.MathContext mathContext)
Returns a sequential ordered
Stream<BigDecimal> from startInclusive
(inclusive) to endExclusive (exclusive) by an incremental step . |
static java.util.stream.Stream<java.math.BigDecimal> |
rangeClosed(java.math.BigDecimal startInclusive,
java.math.BigDecimal endInclusive,
java.math.BigDecimal step,
java.math.MathContext mathContext)
Returns a sequential ordered
Stream<BigDecimal> from startInclusive
(inclusive) to endInclusive (inclusive) by an incremental step . |
static java.util.stream.Stream<java.math.BigDecimal> |
rangeClosed(double startInclusive,
double endInclusive,
double step,
java.math.MathContext mathContext)
Returns a sequential ordered
Stream<BigDecimal> from startInclusive
(inclusive) to endInclusive (inclusive) by an incremental step . |
static java.util.stream.Stream<java.math.BigDecimal> |
rangeClosed(long startInclusive,
long endInclusive,
long step,
java.math.MathContext mathContext)
Returns a sequential ordered
Stream<BigDecimal> from startInclusive
(inclusive) to endInclusive (inclusive) by an incremental step . |
public static java.util.stream.Stream<java.math.BigDecimal> range(java.math.BigDecimal startInclusive, java.math.BigDecimal endExclusive, java.math.BigDecimal step, java.math.MathContext mathContext)
Stream<BigDecimal>
from startInclusive
(inclusive) to endExclusive
(exclusive) by an incremental step
.
An equivalent sequence of increasing values can be produced
sequentially using a for
loop as follows:
for (BigDecimal i = startInclusive; i.compareTo(endExclusive) < 0; i = i.add(step, mathContext)) { // ... }
startInclusive
- the (inclusive) initial valueendExclusive
- the exclusive upper boundstep
- the step between elementsmathContext
- the MathContext
used for all mathematical operationsStream<BigDecimal>
public static java.util.stream.Stream<java.math.BigDecimal> range(long startInclusive, long endExclusive, long step, java.math.MathContext mathContext)
Stream<BigDecimal>
from startInclusive
(inclusive) to endExclusive
(exclusive) by an incremental step
.
The long
arguments are converted using BigDecimal.valueOf(long)
.
startInclusive
- the (inclusive) initial valueendExclusive
- the exclusive upper boundstep
- the step between elementsmathContext
- the MathContext
used for all mathematical operationsStream<BigDecimal>
range(BigDecimal, BigDecimal, BigDecimal, MathContext)
public static java.util.stream.Stream<java.math.BigDecimal> range(double startInclusive, double endExclusive, double step, java.math.MathContext mathContext)
Stream<BigDecimal>
from startInclusive
(inclusive) to endExclusive
(exclusive) by an incremental step
.
The double
arguments are converted using BigDecimal.valueOf(double)
.
startInclusive
- the (inclusive) initial valueendExclusive
- the exclusive upper boundstep
- the step between elementsmathContext
- the MathContext
used for all mathematical operationsStream<BigDecimal>
range(BigDecimal, BigDecimal, BigDecimal, MathContext)
public static java.util.stream.Stream<java.math.BigDecimal> rangeClosed(java.math.BigDecimal startInclusive, java.math.BigDecimal endInclusive, java.math.BigDecimal step, java.math.MathContext mathContext)
Stream<BigDecimal>
from startInclusive
(inclusive) to endInclusive
(inclusive) by an incremental step
.
An equivalent sequence of increasing values can be produced
sequentially using a for
loop as follows:
for (BigDecimal i = startInclusive; i.compareTo(endInclusive) <= 0; i = i.add(step, mathContext)) { // ... }
startInclusive
- the (inclusive) initial valueendInclusive
- the inclusive upper boundstep
- the step between elementsmathContext
- the MathContext
used for all mathematical operationsStream<BigDecimal>
range(BigDecimal, BigDecimal, BigDecimal, MathContext)
public static java.util.stream.Stream<java.math.BigDecimal> rangeClosed(long startInclusive, long endInclusive, long step, java.math.MathContext mathContext)
Stream<BigDecimal>
from startInclusive
(inclusive) to endInclusive
(inclusive) by an incremental step
.
The long
arguments are converted using BigDecimal.valueOf(long)
.
startInclusive
- the (inclusive) initial valueendInclusive
- the inclusive upper boundstep
- the step between elementsmathContext
- the MathContext
used for all mathematical operationsStream<BigDecimal>
rangeClosed(BigDecimal, BigDecimal, BigDecimal, MathContext)
public static java.util.stream.Stream<java.math.BigDecimal> rangeClosed(double startInclusive, double endInclusive, double step, java.math.MathContext mathContext)
Stream<BigDecimal>
from startInclusive
(inclusive) to endInclusive
(inclusive) by an incremental step
.
The double
arguments are converted using BigDecimal.valueOf(double)
.
startInclusive
- the (inclusive) initial valueendInclusive
- the inclusive upper boundstep
- the step between elementsmathContext
- the MathContext
used for all mathematical operationsStream<BigDecimal>
rangeClosed(BigDecimal, BigDecimal, BigDecimal, MathContext)