org.jpos.iso
Class NullPadder
java.lang.Object
org.jpos.iso.NullPadder
- All Implemented Interfaces:
- Padder
public class NullPadder
- extends Object
- implements Padder
The NullPadder does not pad. It is a utility class to use Null Object
pattern.
- Version:
- $Revision$ $Date$
- Author:
- joconnor
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
INSTANCE
public static final NullPadder INSTANCE
- The only instance you need
NullPadder
public NullPadder()
pad
public String pad(String data,
int maxLength)
- Description copied from interface:
Padder
- Returns a padded string upto a maximum length. If the data is longer
than maxLength, then the data is truncated.
- Specified by:
pad in interface Padder
- Parameters:
data - The string to pad.maxLength - The maximum length of the padded string.
- Returns:
- A padded string.
- See Also:
org.jpos.iso.Padder#pad(java.lang.String, int, char)
unpad
public String unpad(String paddedData)
- (non-Javadoc)
- Specified by:
unpad in interface Padder
- Parameters:
paddedData - The string to unpad.
- Returns:
- The unpadded string.
- See Also:
org.jpos.iso.Padder#unpad(java.lang.String, char)
Copyright © 1998-2012 jPOS.org. All Rights Reserved.