Class ProductReader


  • public class ProductReader
    extends java.lang.Object
    User agent header reader.
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private ProductReader()
      Private constructor to ensure that the class acts as a true utility class i.e.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.util.List<Product> read​(java.lang.String userAgent)
      Parses the given user agent String to a list of Product instances.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ProductReader

        private ProductReader()
        Private constructor to ensure that the class acts as a true utility class i.e. it isn't instantiable and extensible.
    • Method Detail

      • read

        public static java.util.List<Product> read​(java.lang.String userAgent)
                                            throws java.lang.IllegalArgumentException
        Parses the given user agent String to a list of Product instances.
        Parameters:
        userAgent -
        Returns:
        the List of Product objects parsed from the String
        Throws:
        java.lang.IllegalArgumentException - Thrown if the String can not be parsed as a list of Product instances.