|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectsbrt.shell.text.math.CoeffFormatV2
public final class CoeffFormatV2
This class is a concrete implementation of CoeffFormat. The string representation of a coefficient is: numerical value.
Constructor Summary | |
---|---|
CoeffFormatV2()
Constructs a new coefficient format object. |
Method Summary | |
---|---|
java.lang.String |
format(double coefficient)
Returns a formatted string representation of the provided coefficient. |
java.lang.String |
format(java.lang.Double coefficient)
Returns a formatted string representation of the provided coefficient. |
DoubleFormatV1 |
getNumberFormat()
Returns the format used for numerical values. |
java.lang.Double |
parse(java.lang.String coefficient)
Parses the provided string and returns its corresponding coefficient. |
double |
parsePrimitive(java.lang.String coeff)
Parses the provided string and returns its corresponding coefficient. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CoeffFormatV2()
Method Detail |
---|
public DoubleFormatV1 getNumberFormat()
public java.lang.String format(java.lang.Double coefficient)
format
in interface Formatter<java.lang.Double>
format
in interface CoeffFormat
coefficient
- the coefficient to be formatted.
java.lang.NullPointerException
- if the provided
coefficient is null
.public java.lang.String format(double coefficient)
format
in interface CoeffFormat
coefficient
- the coefficient to be formatted.
java.lang.NullPointerException
- if the provided
coefficient is null
.public java.lang.Double parse(java.lang.String coefficient)
parse
in interface CoeffFormat
parse
in interface Parser<java.lang.Double>
coefficient
- the string to be parsed.
java.lang.NullPointerException
- if the provided
coefficient is null
.public double parsePrimitive(java.lang.String coeff)
parsePrimitive
in interface CoeffFormat
coeff
- the string to be parsed.
java.lang.NullPointerException
- if the provided
coefficient is null
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |