public class Percent extends FixedPointFloat implements Comparable<Percent>
Modifier and Type | Field and Description |
---|---|
static int |
DIGITS |
static String |
MAX_VALUE |
static String |
MIN_VALUE |
PRIME_HASHCODE, ZERO
Constructor and Description |
---|
Percent()
Don't call this constructor! For DWR internal use only!
|
Percent(Long value)
Constructor with stored long value in the database in parameter.
|
Percent(String value) |
Modifier and Type | Method and Description |
---|---|
Percent |
abs() |
Percent |
add(Integer augend) |
Percent |
add(Percent augend) |
int |
compareTo(Percent o) |
Percent |
divide(Integer divisor) |
Percent |
divide(Percent divisor) |
int |
fractionOf(int multiplicand)
Returns the integer result of percent value multiplied by the given integer argument.
|
static Percent |
fromPercentageString(String value) |
static Percent |
fromSubTotal(int sub,
int total) |
Percent |
multiply(Integer multiplicand) |
Percent |
multiply(Percent multiplicand) |
Percent |
negate() |
Percent |
round() |
Percent |
subtract(Integer subtrahend) |
Percent |
subtract(Percent subtrahend) |
static String |
toPercentageString(Percent percent) |
compareTo, doubleValue, equals, floatValue, getBigDecimalValue, getDigits, getValue, getValue, hashCode, intValue, isZero, longValue, setDigits, setValue, toString, toString
byteValue, shortValue
public static final String MIN_VALUE
public static final String MAX_VALUE
public static final int DIGITS
public Percent()
public Percent(Long value)
public Percent(String value)
public static Percent fromSubTotal(int sub, int total)
public Percent abs()
public Percent negate()
public Percent round()
public int fractionOf(int multiplicand)
multiplicand
- public int compareTo(Percent o)
compareTo
in interface Comparable<Percent>
Copyright © 2021. All rights reserved.