Class 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}
    • 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.String formatToString​(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
    • Constructor Detail

      • ExcelCollectionFormatter

        public ExcelCollectionFormatter()
    • 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:
        formatToString in interface CollectionFormatter
        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:
        formatToCollection in interface CollectionFormatter
        Parameters:
        string - formatted collection from a single Excel cell
        Returns:
        collection of extracted elements