org.scopemvc.util.convertor
Class NullStringConvertor

java.lang.Object
  |
  +--org.scopemvc.util.convertor.NullStringConvertor
All Implemented Interfaces:
StringConvertor
Direct Known Subclasses:
BigDecimalStringConvertor, BooleanStringConvertor, DateStringConvertor, NumberStringConvertor, StringStringConvertor

public abstract class NullStringConvertor
extends java.lang.Object
implements StringConvertor

Abstract base class for StringConvertors that recognise a presetn String value to represent null.

Version:
$Revision: 1.3 $ $Date: 2002/09/05 15:41:47 $
Author:
Steve Meyfroidt
, Daniel Michalik

Constructor Summary
NullStringConvertor()
           
 
Method Summary
 java.lang.String getNullAsString()
           
protected  boolean isNull(java.lang.String inString)
          Does the passed String represent null.
 void setNullAsString(java.lang.String inNullString)
          Sets String representation used when parameter in valueAsString is null.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.scopemvc.util.convertor.StringConvertor
stringAsValue, valueAsString
 

Constructor Detail

NullStringConvertor

public NullStringConvertor()
Method Detail

getNullAsString

public java.lang.String getNullAsString()
Returns:
a String representation used when parameter in valueAsString is null. Default value is empty string.

setNullAsString

public void setNullAsString(java.lang.String inNullString)
                     throws java.lang.IllegalArgumentException
Sets String representation used when parameter in valueAsString is null. Method stringAsValue also uses this value: if parameter is equal to this representation, return value should be null. Default value is empty string.

Parameters:
inNullString - The new nullAsString value
Throws:
java.lang.IllegalArgumentException - if passed value is null.

isNull

protected boolean isNull(java.lang.String inString)
Does the passed String represent null.

Parameters:
inString - TODO: Describe the Parameter
Returns:
The null value


Copyright © 2000-2002 The Scope Team. All Rights Reserved.