org.omnaest.utils.structure.collection
Class CollectionUtils.CollectionTransformerToString<FROM>

java.lang.Object
  extended by org.omnaest.utils.structure.collection.CollectionUtils.CollectionTransformerToString<FROM>
Type Parameters:
FROM -
All Implemented Interfaces:
CollectionUtils.CollectionConverter<FROM,String>
Enclosing class:
CollectionUtils

public abstract static class CollectionUtils.CollectionTransformerToString<FROM>
extends Object
implements CollectionUtils.CollectionConverter<FROM,String>

CollectionUtils.CollectionConverter which produces a String from a Collection

Author:
Omnaest

Constructor Summary
CollectionUtils.CollectionTransformerToString()
           
 
Method Summary
 void process(FROM element)
          Processes the given Collection element.
abstract  void process(FROM element, StringBuilder resultStringBuilder)
          The process(Object, StringBuilder) method will be invoked for every element of the processed Collection.
 String result()
          Returns the result of the transformation process
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CollectionUtils.CollectionTransformerToString

public CollectionUtils.CollectionTransformerToString()
Method Detail

process

public void process(FROM element)
Description copied from interface: CollectionUtils.CollectionConverter
Processes the given Collection element. This method will be called for each element of the original Collection

Specified by:
process in interface CollectionUtils.CollectionConverter<FROM,String>

process

public abstract void process(FROM element,
                             StringBuilder resultStringBuilder)
The process(Object, StringBuilder) method will be invoked for every element of the processed Collection. The given StringBuilder instance will build the resulting String and should be used to store the iteration result.

Parameters:
element -
resultStringBuilder -

result

public String result()
Description copied from interface: CollectionUtils.CollectionConverter
Returns the result of the transformation process

Specified by:
result in interface CollectionUtils.CollectionConverter<FROM,String>
Returns:


Copyright © 2013. All Rights Reserved.