class FormatConverter
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private static java.lang.String |
LOCAL_FORMAT_PATTERN |
Constructor and Description |
---|
FormatConverter() |
Modifier and Type | Method and Description |
---|---|
private static int |
additionPrecedence(AddConverter converter,
boolean continued,
int unitPrecedence,
java.lang.StringBuilder buffer) |
private static int |
exponentPrecedenceExpConveter(ExpConverter converter,
int unitPrecedence,
java.lang.StringBuilder buffer) |
private static int |
exponentPrecedenceLogConveter(LogConverter converter,
java.lang.StringBuilder buffer) |
(package private) static int |
formatConverter(javax.measure.UnitConverter converter,
boolean continued,
int unitPrecedence,
java.lang.StringBuilder buffer,
SymbolMap symbolMap)
Formats the given converter to the given StringBuilder and returns the operator precedence of the converter's mathematical operation.
|
private static int |
formatFormattable(java.util.Formattable f,
int unitPrecedence,
java.lang.StringBuilder buffer)
Formats the given
Formattable to the given StringBuffer and returns the given precedence of the converter's mathematical operation. |
private static int |
noopPrecedence(java.lang.StringBuilder buffer,
SymbolMap symbolMap,
MetricPrefix prefix) |
private static int |
productPrecedence(MultiplyConverter converter,
boolean continued,
int unitPrecedence,
java.lang.StringBuilder buffer) |
private static int |
productPrecedence(RationalConverter converter,
boolean continued,
int unitPrecedence,
java.lang.StringBuilder buffer) |
private static final java.lang.String LOCAL_FORMAT_PATTERN
static int formatConverter(javax.measure.UnitConverter converter, boolean continued, int unitPrecedence, java.lang.StringBuilder buffer, SymbolMap symbolMap)
Compound
converter.converter
- the converter to be formattedcontinued
- true
if the converter expression should begin with an operator, otherwise false
.unitPrecedence
- the operator precedence of the operation expressed by the unit being modified by the given converter.buffer
- the StringBuffer
to append to.private static int productPrecedence(RationalConverter converter, boolean continued, int unitPrecedence, java.lang.StringBuilder buffer)
private static int productPrecedence(MultiplyConverter converter, boolean continued, int unitPrecedence, java.lang.StringBuilder buffer)
private static int exponentPrecedenceExpConveter(ExpConverter converter, int unitPrecedence, java.lang.StringBuilder buffer)
private static int exponentPrecedenceLogConveter(LogConverter converter, java.lang.StringBuilder buffer)
private static int additionPrecedence(AddConverter converter, boolean continued, int unitPrecedence, java.lang.StringBuilder buffer)
private static int noopPrecedence(java.lang.StringBuilder buffer, SymbolMap symbolMap, MetricPrefix prefix)
private static int formatFormattable(java.util.Formattable f, int unitPrecedence, java.lang.StringBuilder buffer)
Formattable
to the given StringBuffer and returns the given precedence of the converter's mathematical operation.f
- the formattable to be formattedunitPrecedence
- the operator precedence of the operation expressed by the unit being modified by the given converter.buffer
- the StringBuffer
to append to.