All Packages Class Hierarchy This Package Previous Next Index
Interface com.roguewave.common.Formattable
- public abstract interface Formattable
Any class which is to be formatted with the
com.roguewave.format package must implement
this interface.
A Class that implements Formattable should use 0 for
its default rounding method.
-
getLeading()
-
Returns a string representing that portion of the formatted value
which is to appear to the left of the decimal symbol.
-
getTrailing()
-
Returns a string representing that portion of the formatted value
which is to appear to the right of the decimal symbol.
-
isPositive()
- Returns true if self should be formatted as a positive value
-
rounded(int, int)
- Returns a new version of self with its value modified
according to the specified number of decimal places and rounding
method.
isPositive
public abstract boolean isPositive()
- Returns true if self should be formatted as a positive value
getLeading
public abstract String getLeading()
- Returns a string representing that portion of the formatted value
which is to appear to the left of the decimal symbol.
getTrailing
public abstract String getTrailing()
- Returns a string representing that portion of the formatted value
which is to appear to the right of the decimal symbol.
rounded
public abstract Formattable rounded(int decimalPlaces,
int roundingMethod)
- Returns a new version of self with its value modified
according to the specified number of decimal places and rounding
method.
Note that a class that implements the Formattable interface
should use 0 for its default rounding method.
All Packages Class Hierarchy This Package Previous Next Index