org.sovt.impl
Class TrimTransformer

java.lang.Object
  extended byorg.sovt.impl.TrimTransformer
All Implemented Interfaces:
Transformer

public class TrimTransformer
extends java.lang.Object
implements Transformer

This transformer is for trimming string objects. "toString()" method is invoked on the object first. "null" objects are skipped.

Author:
Vilmantas Baranauskas (vilmantas_baranauskas@yahoo.com)

Constructor Summary
TrimTransformer()
          Creates instance of TrimTransformer.
 
Method Summary
 java.lang.Object clone()
          Returns itself.
 java.lang.Object transform(java.lang.Object object)
          Trims string value.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TrimTransformer

public TrimTransformer()
Creates instance of TrimTransformer.

Method Detail

clone

public java.lang.Object clone()
Returns itself. This transformer is not configurable and therefore single instance may be used everywhere.

Specified by:
clone in interface Transformer
Returns:
clone of itself.

transform

public java.lang.Object transform(java.lang.Object object)
Trims string value. "toString()" method is invoked on the object first. "null" objects are skipped.

Specified by:
transform in interface Transformer
Parameters:
object - String value to trim.
Returns:
trimmed string or null if object is null.


Copyright © 2003-2005 . All Rights Reserved.