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.


Method Index

 o getLeading()
Returns a string representing that portion of the formatted value which is to appear to the left of the decimal symbol.
 o getTrailing()
Returns a string representing that portion of the formatted value which is to appear to the right of the decimal symbol.
 o isPositive()
Returns true if self should be formatted as a positive value
 o rounded(int, int)
Returns a new version of self with its value modified according to the specified number of decimal places and rounding method.

Methods

 o isPositive
 public abstract boolean isPositive()
Returns true if self should be formatted as a positive value

 o 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.

 o 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.

 o 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