to.etc.domui.util
Class PropertyValueConverter<T>

java.lang.Object
  extended by to.etc.domui.util.PropertyValueConverter<T>
All Implemented Interfaces:
IConverter<T>, IObjectToStringConverter<T>, IStringToObjectConverter<T>

public final class PropertyValueConverter<T>
extends java.lang.Object
implements IConverter<T>

This converts an object to a string by creating a string from a list of property values off that object.

Author:
Frits Jalvingh Created on Dec 16, 2010

Constructor Summary
PropertyValueConverter(java.lang.String... properties)
           
 
Method Summary
 java.lang.String convertObjectToString(java.util.Locale loc, T in)
          Use the property list to get a value for each property, and append to the string to return.
 T convertStringToObject(java.util.Locale loc, java.lang.String in)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PropertyValueConverter

public PropertyValueConverter(java.lang.String... properties)
Method Detail

convertStringToObject

public T convertStringToObject(java.util.Locale loc,
                               java.lang.String in)
                        throws UIException
Specified by:
convertStringToObject in interface IStringToObjectConverter<T>
Throws:
UIException

convertObjectToString

public java.lang.String convertObjectToString(java.util.Locale loc,
                                              T in)
                                       throws UIException
Use the property list to get a value for each property, and append to the string to return.

Specified by:
convertObjectToString in interface IObjectToStringConverter<T>
Throws:
UIException
See Also:
IObjectToStringConverter.convertObjectToString(java.util.Locale, java.lang.Object)