ca.odell.glazedlists.swt
Class DefaultItemFormat<E>

java.lang.Object
  extended by ca.odell.glazedlists.swt.DefaultItemFormat<E>
All Implemented Interfaces:
ItemFormat<E>

public class DefaultItemFormat<E>
extends Object
implements ItemFormat<E>

Default implementation of ItemFormat that converts an element by calling toString() on it. If the element is null, by default, the empty string is returned, but another default value can be specified.

Author:
Holger Brands
See Also:
DefaultItemFormat(String)

Constructor Summary
DefaultItemFormat()
          Default constructor which uses the empty string as representation for null elements.
DefaultItemFormat(String valueForNullElement)
          Constructor which takes a default value for representing a null element.
 
Method Summary
 String format(E element)
          Converts a list element to a string.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultItemFormat

public DefaultItemFormat()
Default constructor which uses the empty string as representation for null elements.


DefaultItemFormat

public DefaultItemFormat(String valueForNullElement)
Constructor which takes a default value for representing a null element.

Parameters:
valueForNullElement - string value to be used for a null element
Method Detail

format

public String format(E element)
Description copied from interface: ItemFormat
Converts a list element to a string.

Specified by:
format in interface ItemFormat<E>
Parameters:
element - the element to convert
Returns:
the string representation


Glazed Lists, Copyright © 2003 publicobject.com, O'Dell Engineering.
Documentation build by hbrands at 2013-02-12 20:58