Class ExcelCollectionFormatter
- java.lang.Object
-
- com.hybris.backoffice.excel.template.ExcelCollectionFormatter
-
- All Implemented Interfaces:
CollectionFormatter
public class ExcelCollectionFormatter extends java.lang.Object implements CollectionFormatter
The pattern used for a collection of "apple","banana","orange" looks as follows:{apple},{banana},{orange}
-
-
Constructor Summary
Constructors Constructor Description ExcelCollectionFormatter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Set<java.lang.String>formatToCollection(java.lang.String string)Extracts the collection from a single Excel cell to a collection.java.lang.StringformatToString(java.util.Collection<java.lang.String> collection)Formats given collection to a string that can be put to a single Excel cell.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.hybris.backoffice.excel.template.CollectionFormatter
formatToString
-
-
-
-
Method Detail
-
formatToString
public java.lang.String formatToString(@Nonnull java.util.Collection<java.lang.String> collection)Formats given collection to a string that can be put to a single Excel cell.- Specified by:
formatToStringin interfaceCollectionFormatter- Parameters:
collection- of elements that are intended to be put in a single Excel cell- Returns:
- collection representation ready to be put to a single Excel cell
-
formatToCollection
public java.util.Set<java.lang.String> formatToCollection(@Nonnull java.lang.String string)Extracts the collection from a single Excel cell to a collection. The maximum number of elements extracted is 1000.- Specified by:
formatToCollectionin interfaceCollectionFormatter- Parameters:
string- formatted collection from a single Excel cell- Returns:
- collection of extracted elements
-
-