com.instantbank.component.lettertemplate.util
Class VariablesFormat.IbNumberFormat

java.lang.Object
  |
  +--com.instantbank.component.lettertemplate.util.VariablesFormat.IbNumberFormat
Enclosing class:
VariablesFormat

class VariablesFormat.IbNumberFormat
extends java.lang.Object

Auxiliary class representing all number formatters.


Field Summary
(package private)  java.text.NumberFormat formatter
          Flavor of the baseFormatter used by this formatter.
(package private)  java.lang.String leftNegative
          Prefix to be added if number is negative
(package private)  java.lang.String leftPositive
          Prefix to be added if number is positive
(package private)  java.lang.String rightNegative
          Suffix to be added if number is negative
(package private)  java.lang.String rightPositive
          Suffix to be added if number is positive
(package private)  VariablesFormat.MakeUpFormat rounder
          Auxiliary object that trims figures to the right/left of the basic formatted string.
(package private)  boolean trimPeriod
           
 
Constructor Summary
VariablesFormat.IbNumberFormat(java.text.NumberFormat numFormat, VariablesFormat.MakeUpFormat rounder)
          Constructor.
VariablesFormat.IbNumberFormat(java.text.NumberFormat numFormat, VariablesFormat.MakeUpFormat rounder, java.lang.String rNeg, java.lang.String lPos, boolean trimPeriod)
          Constructor.
 
Method Summary
 java.lang.String format(double dval)
          Formats a double value.
 java.lang.String format(long lval)
          Formats a long value.
 void setLeftNegative(java.lang.String s)
          Sets the leftNegative attribute of the IbNumberFormat object
 void setLeftPositive(java.lang.String s)
          Sets the leftPositive attribute of the IbNumberFormat object
 void setRightNegative(java.lang.String s)
          Sets the rightNegative attribute of the IbNumberFormat object
 void setRightPositive(java.lang.String s)
          Sets the rightPositive attribute of the IbNumberFormat object
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

formatter

java.text.NumberFormat formatter
Flavor of the baseFormatter used by this formatter.

rounder

VariablesFormat.MakeUpFormat rounder
Auxiliary object that trims figures to the right/left of the basic formatted string.

trimPeriod

boolean trimPeriod

rightNegative

java.lang.String rightNegative
Suffix to be added if number is negative

leftPositive

java.lang.String leftPositive
Prefix to be added if number is positive

rightPositive

java.lang.String rightPositive
Suffix to be added if number is positive

leftNegative

java.lang.String leftNegative
Prefix to be added if number is negative
Constructor Detail

VariablesFormat.IbNumberFormat

public VariablesFormat.IbNumberFormat(java.text.NumberFormat numFormat,
                                      VariablesFormat.MakeUpFormat rounder)
Constructor.
Parameters:
numFormat - Basic number format.
rounder - Auxiliary Rounder.

VariablesFormat.IbNumberFormat

public VariablesFormat.IbNumberFormat(java.text.NumberFormat numFormat,
                                      VariablesFormat.MakeUpFormat rounder,
                                      java.lang.String rNeg,
                                      java.lang.String lPos,
                                      boolean trimPeriod)
Constructor.
Parameters:
numFormat - Basic number format.
rounder - Auxiliary Rounder.
rNeg - Suffix if negative number.
lPos - Prefix if positive number.
trimPeriod - Decimal period should be deleted?
Method Detail

setLeftPositive

public void setLeftPositive(java.lang.String s)
Sets the leftPositive attribute of the IbNumberFormat object
Parameters:
s - The new leftPositive value

setLeftNegative

public void setLeftNegative(java.lang.String s)
Sets the leftNegative attribute of the IbNumberFormat object
Parameters:
s - The new leftNegative value

setRightPositive

public void setRightPositive(java.lang.String s)
Sets the rightPositive attribute of the IbNumberFormat object
Parameters:
s - The new rightPositive value

setRightNegative

public void setRightNegative(java.lang.String s)
Sets the rightNegative attribute of the IbNumberFormat object
Parameters:
s - The new rightNegative value

format

public java.lang.String format(long lval)
Formats a long value.
Parameters:
lval - The value to be formated.
Returns:
The formated value.

format

public java.lang.String format(double dval)
Formats a double value.
Parameters:
dval - The value to be formated.
Returns:
The formated value.