net.ontopia.utils
Class CollectionStringifier

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

public class CollectionStringifier
extends java.lang.Object
implements StringifierIF

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


Field Summary
protected  java.util.Comparator comparator
           
protected  java.lang.String item_prefix
           
protected  java.lang.String item_suffix
           
protected  java.lang.String list_prefix
           
protected  java.lang.String list_suffix
           
protected  StringifierIF stringifier
           
 
Constructor Summary
CollectionStringifier(StringifierIF stringifier)
           
CollectionStringifier(StringifierIF stringifier, java.util.Comparator comparator)
           
 
Method Summary
 java.lang.String getItemPrefix()
           
 java.lang.String getItemSuffix()
           
 java.lang.String getListPrefix()
           
 java.lang.String getListSuffix()
           
 void setItemPrefix(java.lang.String prefix)
           
 void setItemSuffix(java.lang.String suffix)
           
 void setListPrefix(java.lang.String prefix)
           
 void setListSuffix(java.lang.String suffix)
           
 java.lang.String toString(java.lang.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 java.util.Comparator comparator

stringifier

protected StringifierIF stringifier

item_prefix

protected java.lang.String item_prefix

item_suffix

protected java.lang.String item_suffix

list_prefix

protected java.lang.String list_prefix

list_suffix

protected java.lang.String list_suffix
Constructor Detail

CollectionStringifier

public CollectionStringifier(StringifierIF stringifier)

CollectionStringifier

public CollectionStringifier(StringifierIF stringifier,
                             java.util.Comparator comparator)
Method Detail

getItemPrefix

public java.lang.String getItemPrefix()

setItemPrefix

public void setItemPrefix(java.lang.String prefix)

getItemSuffix

public java.lang.String getItemSuffix()

setItemSuffix

public void setItemSuffix(java.lang.String suffix)

getListPrefix

public java.lang.String getListPrefix()

setListPrefix

public void setListPrefix(java.lang.String prefix)

getListSuffix

public java.lang.String getListSuffix()

setListSuffix

public void setListSuffix(java.lang.String suffix)

toString

public java.lang.String toString(java.lang.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.