public static class PluralRules.FixedDecimal extends java.lang.Number implements java.lang.Comparable<PluralRules.FixedDecimal>, PluralRules.IFixedDecimal
| Modifier and Type | Field and Description |
|---|---|
boolean |
isNegative |
double |
source |
| Constructor and Description |
|---|
FixedDecimal(double n) |
FixedDecimal(double n,
int v) |
FixedDecimal(double n,
int v,
long f) |
FixedDecimal(long n) |
FixedDecimal(java.lang.String n) |
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(PluralRules.FixedDecimal other) |
static int |
decimals(double n)
Return a guess as to the number of decimals that would be displayed.
|
double |
doubleValue() |
boolean |
equals(java.lang.Object arg0) |
float |
floatValue() |
int |
getBaseFactor() |
long |
getDecimalDigits() |
long |
getDecimalDigitsWithoutTrailingZeros() |
long |
getIntegerValue() |
static PluralRules.Operand |
getOperand(java.lang.String t) |
double |
getPluralOperand(PluralRules.Operand operand) |
long |
getShiftedValue() |
double |
getSource() |
int |
getVisibleDecimalDigitCount() |
int |
getVisibleDecimalDigitCountWithoutTrailingZeros() |
int |
hashCode() |
boolean |
hasIntegerValue() |
int |
intValue() |
boolean |
isHasIntegerValue() |
boolean |
isInfinite() |
boolean |
isNaN() |
boolean |
isNegative() |
long |
longValue() |
java.lang.String |
toString() |
public FixedDecimal(double n,
int v,
long f)
n - is the original numberv - number of digits to the right of the decimal place. e.g
1.00 = 2 25. = 0f - Corresponds to f in the plural rules grammar. The digits
to the right of the decimal place as an integer. e.g 1.10
= 10public FixedDecimal(double n,
int v)
public FixedDecimal(double n)
public FixedDecimal(long n)
public FixedDecimal(java.lang.String n)
public double getSource()
public int getVisibleDecimalDigitCount()
public int getVisibleDecimalDigitCountWithoutTrailingZeros()
public long getDecimalDigits()
public long getDecimalDigitsWithoutTrailingZeros()
public long getIntegerValue()
public boolean isHasIntegerValue()
public boolean isNegative()
public int getBaseFactor()
public static int decimals(double n)
public double getPluralOperand(PluralRules.Operand operand)
getPluralOperand in interface PluralRules.IFixedDecimalpublic static PluralRules.Operand getOperand(java.lang.String t)
public int compareTo(PluralRules.FixedDecimal other)
compareTo in interface java.lang.Comparable<PluralRules.FixedDecimal>public boolean equals(java.lang.Object arg0)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Objectpublic boolean hasIntegerValue()
public int intValue()
intValue in class java.lang.Numberpublic long longValue()
longValue in class java.lang.Numberpublic float floatValue()
floatValue in class java.lang.Numberpublic double doubleValue()
doubleValue in class java.lang.Numberpublic long getShiftedValue()
public boolean isNaN()
isNaN in interface PluralRules.IFixedDecimalpublic boolean isInfinite()
isInfinite in interface PluralRules.IFixedDecimal