public class AverageDecimal extends Object implements Iterable<BigDecimal>
| Modifier and Type | Method and Description |
|---|---|
BigDecimal |
get(int i) |
BigDecimal |
getAvgValue() |
int |
getFixCount() |
BigDecimal |
getFixValue() |
BigDecimal |
getPrecision() |
@NotNull Iterator<BigDecimal> |
iterator() |
static AverageDecimal |
of(BigDecimal total,
int count)
average the number with the count, and the scale is 2 (0.01)
20/6 = [3.33, 3.33, 3.34, 3.33, 3.33, 3.34]
|
static AverageDecimal |
of(BigDecimal total,
int count,
int scale)
average the number with the count, and the assigned scale
20/6 = [3.33, 3.33, 3.34, 3.33, 3.33, 3.34]
|
int |
scale() |
int |
size() |
String |
toString() |
BigDecimal |
total() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitforEach, spliteratorpublic static AverageDecimal of(BigDecimal total, int count)
total - the number to be averagedcount - the partpublic static AverageDecimal of(BigDecimal total, int count, int scale)
total - the number to be averagedcount - the partscale - the item's scale@NotNull public @NotNull Iterator<BigDecimal> iterator()
iterator in interface Iterable<BigDecimal>public BigDecimal get(int i)
public int size()
public BigDecimal total()
public int scale()
public BigDecimal getPrecision()
public BigDecimal getAvgValue()
public BigDecimal getFixValue()
public int getFixCount()
Copyright © 2023. All rights reserved.