Class AbstractProduct

  • All Implemented Interfaces:
    Product
    Direct Known Subclasses:
    AbstractBrandedProduct, DefaultProduct

    public class AbstractProduct
    extends java.lang.Object
    implements Product
    The default implementation of the identification of a product, such as a user agent or a plugin, on a particular platform.
    Author:
    Garret Wilson
    • Constructor Summary

      Constructors 
      Constructor Description
      AbstractProduct​(java.lang.String id, java.lang.String name, java.lang.String version, double versionNumber, int[] versionNumbers)
      ID, name, and version constructor.
    • Constructor Detail

      • AbstractProduct

        public AbstractProduct​(java.lang.String id,
                               java.lang.String name,
                               java.lang.String version,
                               double versionNumber,
                               int[] versionNumbers)
        ID, name, and version constructor.
        Parameters:
        id - The identifying string of the product, or null if the ID is not known.
        name - The canonical name of the product, or null if the name is not known.
        version - The version string provided by the product, or null if there is no string version of the product.
        versionNumber - The version number provided by the product, or Double.NaN if there is no version number of the product.
        versionNumbers - The version number components provided by the product, or null if there are no version number components of the product.
    • Method Detail

      • getID

        public java.lang.String getID()
        Specified by:
        getID in interface Product
        Returns:
        The identifying string of the product, or null if the ID is not known.
      • getName

        public java.lang.String getName()
        Specified by:
        getName in interface Product
        Returns:
        The canonical name of the product, or null if the name is not known.
      • getVersion

        public java.lang.String getVersion()
        Specified by:
        getVersion in interface Product
        Returns:
        The version string provided by the product, or null if there is no string version of the product.
      • getVersionNumber

        public double getVersionNumber()
        Specified by:
        getVersionNumber in interface Product
        Returns:
        The version number provided by the product, or Double.NaN if there is no version number of the product.
      • getVersionNumbers

        public int[] getVersionNumbers()
        Specified by:
        getVersionNumbers in interface Product
        Returns:
        The version number components provided by the product, or null if there are no version number components of the product.