net.ontopia.utils
Class CollectionStringifier

java.lang.Object
  extended by net.ontopia.utils.CollectionStringifier
All Implemented Interfaces:
StringifierIF

public class CollectionStringifier
extends Object
implements StringifierIF

INTERNAL: Stringifier that stringifies collections. A comparator can be used to order the objects in the collection.


Field Summary
protected  Comparator comparator
           
protected  String item_prefix
           
protected  String item_suffix
           
protected  String list_prefix
           
protected  String list_suffix
           
protected  StringifierIF stringifier
           
 
Constructor Summary
CollectionStringifier(StringifierIF stringifier)
           
CollectionStringifier(StringifierIF stringifier, Comparator comparator)
           
 
Method Summary
 String getItemPrefix()
           
 String getItemSuffix()
           
 String getListPrefix()
           
 String getListSuffix()
           
 void setItemPrefix(String prefix)
           
 void setItemSuffix(String suffix)
           
 void setListPrefix(String prefix)
           
 void setListSuffix(String suffix)
           
 String toString(Object objects)
          Returns a stringified version of the object, i.e.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

comparator

protected Comparator comparator

stringifier

protected StringifierIF stringifier

item_prefix

protected String item_prefix

item_suffix

protected String item_suffix

list_prefix

protected String list_prefix

list_suffix

protected String list_suffix
Constructor Detail

CollectionStringifier

public CollectionStringifier(StringifierIF stringifier)

CollectionStringifier

public CollectionStringifier(StringifierIF stringifier,
                             Comparator comparator)
Method Detail

getItemPrefix

public String getItemPrefix()

setItemPrefix

public void setItemPrefix(String prefix)

getItemSuffix

public String getItemSuffix()

setItemSuffix

public void setItemSuffix(String suffix)

getListPrefix

public String getListPrefix()

setListPrefix

public void setListPrefix(String prefix)

getListSuffix

public String getListSuffix()

setListSuffix

public void setListSuffix(String suffix)

toString

public String toString(Object objects)
Description copied from interface: StringifierIF
Returns a stringified version of the object, i.e. a string representation of that object.

Specified by:
toString in interface StringifierIF
Parameters:
objects - the object that is to be made a string representation of.
Returns:
a string representation of the object argument.


Copyright © 2000-2012 Ontopia.