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

java.lang.Object
  |
  +--com.instantbank.component.lettertemplate.util.VariablesFormat.Rounder
All Implemented Interfaces:
VariablesFormat.MakeUpFormat
Direct Known Subclasses:
VariablesFormat.Phone_MakeUp, VariablesFormat.SSN_MakeUp
Enclosing class:
VariablesFormat

class VariablesFormat.Rounder
extends java.lang.Object
implements VariablesFormat.MakeUpFormat

Implementation of MakeUpFormat intended for formatting numbers (not SSN nor Phone)


Field Summary
(package private)  int left
           
(package private)  boolean leftTrimmer
           
(package private)  int right
           
 
Constructor Summary
VariablesFormat.Rounder()
          Period is trimmed, no other truncation.
VariablesFormat.Rounder(int right)
          Period is not trimmed, only right truncation.
VariablesFormat.Rounder(int left, int right)
          Period is not trimmed, there are left and right truncation.
 
Method Summary
 java.lang.String trim(java.lang.String s)
          trim
 java.lang.String trimPeriod(java.lang.String s)
          trimPeriod
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

left

int left

right

int right

leftTrimmer

boolean leftTrimmer
Constructor Detail

VariablesFormat.Rounder

public VariablesFormat.Rounder()
Period is trimmed, no other truncation.

VariablesFormat.Rounder

public VariablesFormat.Rounder(int right)
Period is not trimmed, only right truncation.
Parameters:
right -  

VariablesFormat.Rounder

public VariablesFormat.Rounder(int left,
                               int right)
Period is not trimmed, there are left and right truncation. The right parameter must "include" the thousands separator.
Parameters:
left -  
right -  
Method Detail

trim

public java.lang.String trim(java.lang.String s)
trim
Specified by:
trim in interface VariablesFormat.MakeUpFormat
Parameters:
s -  
Returns:
String

trimPeriod

public java.lang.String trimPeriod(java.lang.String s)
trimPeriod
Specified by:
trimPeriod in interface VariablesFormat.MakeUpFormat
Parameters:
s -  
Returns:
String